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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -