ABPeoplePickerNavigationController-删除“取消"按钮不使用私有方法/属性? [英] ABPeoplePickerNavigationController - remove "Cancel" button without using private methods/properties?

查看:33
本文介绍了ABPeoplePickerNavigationController-删除“取消"按钮不使用私有方法/属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是ABPeoplePickerNavigationController,它是UINavigationController的子类,在上下文中,我使用的是右侧的默认导航栏按钮取消",这没有任何意义.我找不到禁用或隐藏它的方法,并且所使用的任何方法都必须是公开的并且可以存储批准. 完全摆脱导航栏(picker.navigationBarHidden = YES;)可能是一个选择,只是在弹出联系人列表后,导航栏会重新出现. 子类化ABPeoplePickerNavigationController并拦截viewWillAppear尝试取消取消按钮无效. [picker setAllowsCancel:NO];确实可以,但是没有文件记录,所以我希望永远不会通过批准.

I'm using the ABPeoplePickerNavigationController, a subclass of UINavigationController, and in the context I'm using it the default nav bar button for the right side, "Cancel", makes no sense. I can't find a way to disable or hide it, and whatever method used needs to be public and store-approvable. Getting rid of the nav bar entirely (picker.navigationBarHidden = YES;) might be an option except that after popping back to the list of contacts the nav bar reappears. Subclassing ABPeoplePickerNavigationController and intercepting viewWillAppear to try and nil the cancel button did not work. [picker setAllowsCancel:NO]; DOES work but is undocumented so I expect would never pass approval.

推荐答案

对此没有答案-如果您不能接受取消,请写一个新的人员选择器.

There is no answer to this - write a new person picker if you can't live with the cancel.

这篇关于ABPeoplePickerNavigationController-删除“取消"按钮不使用私有方法/属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆