iphone - Passing data to container view -


I'm using the storyboard to create my app:  Enter the image details here

And I know that I can pass the" controller "first by using the controller, using something like data: < / P>

  - Prepare (zero) ForSegue: (UIStoryboardSegue *) Segu sender: (id sender {if ([segue.identifier is EqualToString: @ "some_segue"]) {vc = segue.destinationViewController ; Vc.data = @ "data_i_want_to_pass"; }}   

But now, the data is going through "Tab Bar Controller", not "Discovery Table View Controller". Is there a way that I can pass data to "Discover View Controller" from "First View Controller"? Thank you.

If it is ok to pass data on app startup (because all these controllers will be Instantiated, and embedded segue ), You can pass the Data Bar tab controller, and that controller will give you one. You will have to subdivide the tab bar controller, and as soon as you show the data in your question. Then in the Tab Bar Controller, you can enter some visual ID in this way:

  DiscoverViewController * dvc = [(UINavigationController *) self.viewControllers [0] topViewController]; Dvc.propIWantToSet = self.propThatGotSet; It probably does not seem that the data you want to pass will be available immediately on startup - if it was, you can only work harder in the ViewViewConverter. First place In that case, in the FirstviewController, you can access the tab bar controller with yourself. ChildViewControllers [0] Once you have this reference, you can get the reference of the DiscoverView Controller as shown above.   

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -