问题
I have an iPhone application that I use the ABPersonViewController and I allow delete.
The thing is that the application is a TabBar application and when i use the regular delete method I get this warning:
Presenting action sheet clipped by its superview. Some controls might not respond to touches. On iPhone try -[UIActionSheet showFromTabBar:] or -[UIActionSheet showFromToolbar:] instead of -[UIActionSheet showInView:].
the problem is that when I try to press on the "Cancel" of the delete, it does not work! I want the action sheet to pop up from the TabBar, How do I do that?
this is the code:
if ([personController respondsToSelector:@selector(setAllowsDeletion:)])
[personController setAllowsDeletion:YES]; //CAN CAUSE THE APPLICATION TO BE DENIED FROM THE APP-STORE
回答1:
To display an action sheet from a tab bar, you can call the following within the view controller that is presenting it: [actionSheet showFromTabBar:self.tabBarController.tabBar];
This answer is explained in this post.
来源:https://stackoverflow.com/questions/6402008/abpersonviewcontroller-delete-button-warning