ABPersonViewController delete button warning

﹥>﹥吖頭↗ 提交于 2019-12-25 03:49:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!