xcode6 - ios7 change data in tab1 from tab2 -


I created a test app to debug this issue, so it's only 2 views, tabs and controllers Using the Storyboard layout xcode6

My tab is a label on 1 view and when I hit tab 2, I would like to change it, e.g. It now reads 'foo' and when I tab back, it says 'bar'.

ViewController.h

  @interface ViewController: UIViewController @ Property (strong, non-monomitive) IBotलेट UILLabel * Tab 1 label; @end  

ViewController2.m

  #import "ViewController.h" ... - (zero) viewDidload {Super Viewedload]; ViewController * myVC = [[ViewController alloc] initWithNibName: @ "ViewController" bundle: zero]; NSLog (@ "% @", myVC.tab1Label.text); MyVC & gt; Tab1Label.text = @ "" bar "; }  

It may just be that I'm calling the other view controller wrongly but I'm not sure that the correct way. The log outlume is empty while raising the current text of the label.

Thank you in advance!

  UITabBarController * Tabbar controller = self.tabBarController; ViewController * myVC = (ViewController *) Tab Tab Controller ViewControllers [0]; // 0 = 1 VC  

What was the missing link (courtesy @ RKC on rrewenderlich.com)


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -