UIActionSheet 显示问题?
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];
上面在 iphone上显示正常,大小,包括比例 都是设定frame的大小。
但是在 if(UI_USER_INTERFACE_IDIOM()== UIUserInterfaceIdiomPad) ipad下就在中间显示一个很小的方块。
不知道是什么问题。
在上面会显示一个 红色的button done ,但是不知道 destructiveButtonTitle 和done_button 这个是怎么关联的啊
在iphone下就没问题。
但是在ipad修改为[self.view addSubview:menu]; 显示虽然正确,但是done和done_button 并没有关联上,,done变成了一个小lable
那位熟悉这个控件的帮看看什么问题