views:

367

answers:

1

Hi all,

I have a split View controller ,in which the left side holds a table view controller. Can any1 pls help me, if I wnt to show an action sheet inside the popover , when I click on the detail disclosure button of the table cell ?

Best Regards.

A: 

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];

the 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.

Ibrahim Abdulkarim

related questions