uiviewcontroller - Pass variables with PresentViewController in Swift -


i'm working on swift application , have created links other views using presentviewcontroller can't figure out how pass variables. how pass variables new view?

@ibaction func workoutpressed(sender: anyobject) {     let storyboard = uistoryboard(name: "main", bundle:nil)     let workoutview = storyboard.instantiateviewcontrollerwithidentifier("workoutview") workoutviewcontroller     self.presentviewcontroller(workoutview, animated: false, completion: nil)     //self.navigationcontroller?.pushviewcontroller(workoutview, animated: true) } 

thanks

this easier think: don't need pass parameters because can access class variables of next view controller directly.

that is, can this:

workoutview.myvar = myval 

and, when view loads, myvar have value myval. (don't forget declare in workoutviewcontroller, though).


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -