iOS Passing variables between views in Tab Bar Controller

dusker

macrumors member
Original poster
May 31, 2009
41
0
Hi,

i'm having a problem with passing variables among ViewControllers in tab bar controller.
I've built an app using tab bar template. I've created several tabs (each one got viewcotroller and xib linked). UI works ok. BUT one of the views generate an NSMutableArray that needs to be passed over to another view.
And here's my problem, i don't know how to reference that NSMutableArray that has been generated in that other viewcontroller.
Could anyone help?

thanks
peter
 

drf1229

macrumors regular
Jun 22, 2009
237
0
What you need is to connect the views with IBOutlets. Once thats done, you need to make the variables you want into properties in the views you want.
 
Comment

dusker

macrumors member
Original poster
May 31, 2009
41
0
Thanks for help, i figured it out myself finally.
Inside a viewcontroller that is managed by tab bar you can reference any other by

self.tabBarController.viewControllers - it's an array of viewController instances.
 
Comment

Similar threads

Register on MacRumors! This sidebar will go away, and you'll see fewer ads.