How do I create a UITabBarController with a custom UITabBar class without using IB?

后端 未结 3 736
花落未央
花落未央 2020-12-16 13:03

I can create a UINavigationController with custom bar classes by using initWithNavigationBarClass:toolbarClass:. There doesn\'t seem to be an equi

3条回答
  •  执念已碎
    2020-12-16 13:12

    As far as I know you can't do this. Your best option to do this without IB is to have your own UIViewController (not subclassing UITabBarController) and then add your own subclass of UITabBar to that Controller.

    You may also want to review the Controller Hierarchy if you decide to follow this approach.

提交回复
热议问题