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 indicate showFromRect: inView: animated: method:
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.
I have a split view controller with a table view controller on the left. When I click the table cell When the detailed information of the grid is disclosed, how to display the operation table in the pop-up window?
Try this:
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 indicate showFromRect: inView: animated: method:
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.