开发者

iOS - call one class from another

开发者 https://www.devze.com 2023-03-06 22:51 出处:网络
I want to call class name TabViewController from class name \"ROOTVIEWCONTROLLER\" I want to do this because I want to make TabBarController dynamically. So I want to handle all tab related activity i

I want to call class name TabViewController from class name "ROOTVIEWCONTROLLER" I want to do this because I want to make TabBarController dynamically. So I want to handle all tab related activity in class name TabViewController So f开发者_如何学Pythonrom rootviewcontroller I want to access method of TabViewController which handles the tab. Can any one tell me how it can be done. And where I write the code in rootviewcontroller to do this


create object of tabviewcontroller in the rootviewcontroller and push the tabviewcontroller .


One option is to use the self.tabBarController if you are just trying to get an instance of the tabbarcontroller.

0

精彩评论

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

关注公众号