我有一个 Split View Controller ,其中左侧包含一个 TableView Controller 。当我单击表格单元格的详细信息公开按钮时,如何在弹出窗口内显示操作表?
最佳答案
试试这个:
UIActionSheet *popupSheet = [[UIActionSheet alloc] initWithTitle:@"Title"
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:@"No Way !"
otherButtonTitles:nil];
popupSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;
UIButton * disclosureButton = (UIButton *)cell.accessoryView;
[popupSheet showFromRect:disclosureButton.bounds inView:cell.accessoryView animated:YES];
[popupSheet release];
UIActionSheet docs声明 showFromRect:inView:animated:
方法:
displays the action sheet in a popover whose arrow points to the specified rectangle of the view (in our case the detail disclosure button). The popover does not overlap the specified rectangle.
关于ipad - 如何在弹出窗口中显示操作表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2847950/