Passing data to container view from parent view

I am using a container view (v2-container) to display data in a view controller (v2)

But I am sending data from the root view controller (v1) to this view

v1 -> v2 data transfer is done using the following code

accountContainerViewController.viewControllerID = menuItem.tag
                self.navigationController?.pushViewController(accountContainerViewController, animated: true)

      

and its performance

but to pass v2 -> v2 container i used the following code

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
    if segue.identifier == "signInSegue"{
        let controller = (segue.destinationViewController as LoginViewController)

        controller.viewControllerID = viewControllerID
    }
}

      

But this only happens the first time, but I need to transfer data every time v2 comes up with a v2 container

can someone tell me what i did wrong

early

+3
ios swift segue


source to share


No one has answered this question yet

Check out similar questions:

1300
Transferring data between view controllers
275
Best Practices for Storyboard Logging Screen, Handling Data Cleansing on Logout
1
How to hide and show shortcut when navigating VC1 to VC2 back and forth
0
Xcode Swift: how to stop variables from changing after each viewDidLoad, how to save and update data from different ViewControllers?
0
Reload pfobejct in swift
0
how to make a list with table view cells with user input from another swift view controller
0
Using a Segment Control to Update a Container View
0
PrepareForSegue shows only the first value from the table in detail
0
uigesturerecognizer double click on tableviewcell + segue swift
-1
Passing data from a view controller to another view controller



All Articles
Loading...
X
Show
Funny
Dev
Pics