nilay neeranjun
nilay neeranjun

Reputation: 145

How to pass data from tab bar controller to each tab before they are loaded?

I am sending an HTTP request to a website, and can there are rate restrictions (5 per minute) so I just want to get the data once when the app opens, (my tab bar controller), and then pass that data to each of my tabs. How would I be able to do this. Thank you

Upvotes: 0

Views: 61

Answers (1)

Sandeep Kumar
Sandeep Kumar

Reputation: 899

In each tab you have to get the tabBarController reference and using that reference you can access the values.

MyTabBarController *tabBarObj = (MyTabBarController*)self.tabBarController;
NSLog(@"%@",tabBarObj.responseValue)

Upvotes: 1

Related Questions