objective c - Access to General UITabBarController properties from it's tabs? -


i'll describe want do. have login page(viewcontroller).

after login pass uitabbarcontroller - maintabbar.m. maintabbar has 'key' property, gets user key login page.

the uitabbarcontroller has 2 tabs - tab1.m, tab2.m.

i want access maintabbar propery each tab.

how this?

thanks!

assuming tab1 , tab2 uiviewcontroller subclasses can access key property in either tab1.m or tab2.m as:

#import maintabbar.h //...//  // getting parent tabbarcontroller maintabbar *parenttabbarcontroller = (maintabbar *)self.tabbarcontroller;  // getting key property parent tabbarcontroller nsstring *theuserkey = parenttabbarcontroller.key; 

hope helps!


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -