Reputation: 1382
how to remove my control from the actionsheet without click on actionsheet's buttons in iphone ?
Upvotes: 0
Views: 396
Reputation: 2941
i think you want to dismiss the Action Sheet without tapping any buttons from Action Sheet.
am i right or not ?
You can do it by putting a CancelButton in ActionSheet.
- (void)showOpenOptions
{
UIActionSheet *sheet = [[UIActionSheet alloc]
initWithTitle:NSLocalizedString(@"Open link in external application?", @"Open in external application")
delegate:self
cancelButtonTitle:NSLocalizedString(@"Cancel", @"Cancel")
destructiveButtonTitle:NSLocalizedString(@"Open Link", @"Open Link")
otherButtonTitles:nil];
[sheet showInView:self.view];
[sheet release];
}
i hope you got your answer.
even if any problem then leave a comment. and mark it as correct by clicking correct sign if you get resolved.
Upvotes: 1
Reputation: 57149
I'm not sure what you're asking. If you mean "how can I remove a button from an action sheet once I've already shown it", you can do so by digging through its subviews
array, but you probably shouldn't. If you mean something else, please clarify your question.
Upvotes: 0