ios - Present the current View Controller with different data -


i have view controller, , when button selected, current view controller should present version of can go back. here have:

func buttontapped(sender: uibutton){     let controller = myvc()     controller.txt =  txts[sender.tag]     self.presentviewcontroller(controller, animated: true, completion: nil) } 

this doesn't seem work. when run code "unexpectedly found nil while unwrapping optional value" error message coming storyboard items.

you not need present controller again. change data. if there changes in ui can hide , show or can add or remove super view. , if require presentviewcontroller compulsory use new viewcontroller present. can't present presenting controller.

hope :)


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -