开发者

how to display a a tabbar on a page without calling it in appdelegate

开发者 https://www.devze.com 2023-03-01 05:34 出处:网络
I want to display tabbar with tabbaritems on a page. But the main problem is that I don\'t want the the tabbarcontroller to be called from delegate class. So how is this possi开发者_Python百科ble. Tha

I want to display tabbar with tabbaritems on a page. But the main problem is that I don't want the the tabbarcontroller to be called from delegate class. So how is this possi开发者_Python百科ble. Thanks !!!


Inside your .h file

IBOutlet UITabBarController *tabbarcontroller;
@property(nonatomic,retain) UITabBarController *tabbarcontroller;

in your .m file

[self.view addSubview:tabbarcontroller.view];


You just create and add a UITabBar as a subview of your chosen view. You don't need a UITabBarController to have a tabbar, and even if you do you can add that view to an existing view controller, rather than having it in your delegate.

0

精彩评论

暂无评论...
验证码 换一张
取 消