How to disable the edit button that appears in the more section of a UITabBarController?

前端 未结 16 1043
借酒劲吻你
借酒劲吻你 2020-12-02 11:30

In my application (based on the Tab bar application XCode template) I use a UITabBarController to display a list of different sections of the application that the user can a

16条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 12:19

    At the ones working with Xcode greater than 4.0 (I'm working on Xcode 4.2 for Snow Leopard):

    Check at first where do you change the array of views the last time. I think it doesn't matter in which method you set your customizableView-Array to nil. Apples description says:

    Important: Adding or removing view controllers in your tab bar interface also resets the array of customizable view controllers to the default value, allowing all view controllers to be customized again. Therefore, if you make modifications to the viewControllers property (either directly or by calling the setViewControllers:animated: method) and still want to limit the customizable view controllers, you must also update the array of objects in the customizableViewControllers property.

    It worked for me, so please try it out. I found this description here: link to the description on developer.apple.com at chapter "Preventing the Customization of Tabs".

提交回复
热议问题