menu = [[UIActionSheet alloc] initWithTitle: nil
delegate: self
cancelButtonTitle: nil
destructiveButtonTitle: @ "Done"
otherButtonTitles: nil];
picker_view = [[UIPickerView alloc] init];
picker_view.showsSelectionIndicator = TRUE;
picker_view.delegate = self;
picker_view.dataSource = self;
[Picker_view selectRow: current_symbol_index inComponent: 0 animated: FALSE];
UIButton * done_button;
[Menu addSubview: picker_view];
[Menu showInView: self.view];
[Menu setBounds: CGRectMake (0, 0, 320, 480)];
[Picker_view setFrame: CGRectMake (0, 80, 320, 216)];
done_button = [[UIButton alloc] initWithFrame: CGRectMake (5, 5, 50, 30)];
[Menu addSubview: done_button];
Above normal, the size of the iphone, including the proportion of all set the size of frame.
But in the if (UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPad) ipad displayed in the middle of a small box.
I do not know what the problem is.
In the above displays a red button done, but do not know how this is destructiveButtonTitle and done_button associated ah
Under iphone no problem.
But ipad modified to [self.view addSubview: menu]; show that although correct, but no association done_button done and on,, done into a small lable
Who are familiar with the controls to help see what the problem
No comments:
Post a Comment