p.yarandi p.yarandi - 1 year ago 77
Swift Question

Using data in another tab of UITabBarController

I'm working on an app have three tabs

. In the second tab's
I have some variables I want to use them with their values in first tab. What should I do?

Answer Source

Each tab and its controller stack in a UITabBarControllershould be independent.

If you are passing some settings value I would recommend you to use a NSUSerDefault to store and retrieve the user settings.

The others way is either set up a protocol or use a Observer.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download