hi,
I just started developing for the iphone and making good progress so far. I got totally stuck today when I tried to use a tabbar though
so what I did, I used the IB to built me an UITabBar-Interface. So I used a UITabBarController and populated it with two custom UIViewControllers. So far so good, it works fine. My TabBar gets shown and I can switch between my two views.
My Problem is: I'd like to access some properties of my custom UIViewControllers from the applicationDidFinishLaunching method, but it seems impossible to do. I tried to access the UIViewController class (FirstController) via
FirstController *controller = [[self.tabBarController viewControllers] objectAtIndex:0];
problem is, I soon discovered that the "viewControllers" property of UITabBarController is nonatomic, copy.
So this doesn't work because I get a copy of my view controller instead of a reference. Couldn't find any other way to do this.
to make a long story short: how can I access the view controllers of a TabBar in applicationDidFinishLaunching?
thanks!
I just started developing for the iphone and making good progress so far. I got totally stuck today when I tried to use a tabbar though
so what I did, I used the IB to built me an UITabBar-Interface. So I used a UITabBarController and populated it with two custom UIViewControllers. So far so good, it works fine. My TabBar gets shown and I can switch between my two views.
My Problem is: I'd like to access some properties of my custom UIViewControllers from the applicationDidFinishLaunching method, but it seems impossible to do. I tried to access the UIViewController class (FirstController) via
FirstController *controller = [[self.tabBarController viewControllers] objectAtIndex:0];
problem is, I soon discovered that the "viewControllers" property of UITabBarController is nonatomic, copy.
So this doesn't work because I get a copy of my view controller instead of a reference. Couldn't find any other way to do this.
to make a long story short: how can I access the view controllers of a TabBar in applicationDidFinishLaunching?
thanks!