0

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
Cœur
  • 37,241
  • 25
  • 195
  • 267
eladyanai
  • 1,063
  • 2
  • 15
  • 34

1 Answers1

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.

Community
  • 1
  • 1
  • thank you for your time, but this answer is no good for me, i know all about the function showfromtabbar, but the problem is that i dont call the action sheet. i just allow delete on the ABPersonViewController, and when the user press on the delete button there the action sheet pop's up, this is apple's code... not mine. – eladyanai Jun 19 '11 at 11:39
  • Important: Person view controllers must be used with a navigation controller in order to function properly. This was specified in the class reference of apple documentation. What i can guess is, the cancel button is visible but is clipped by the tab bar present at the bottom, which is refraining it from receiving touches?! –  Jun 19 '11 at 11:49
  • ok.... you are right, when i press on the top of the cancel button it is working and if i press on the bottom of the button it does not. so now i have a new question, how do i properly configure this? i have a TabBar application and in the nib file i added the tabbar buttons and called the other nib's.... – eladyanai Jun 19 '11 at 12:13
  • You could always display it modally. – tc. Jun 20 '11 at 00:21