10 Jan 2020
iOS - presenting views
Present Views Programmatically
- In Interface Builder:
- Set the Custom Class to
- Set Storyboard ID
let storyboard = UIStoryboard (name: "Main", bundle: nil) let viewController = storyboard.instantiateViewController(withIdentifier: "ViewController") as! ViewController self.present(viewController, animated: true, completion: nil)
See how the Rock View is presented in Example in Roshambo
- Set the Custom Class to
Present Views Programmatically plus Segue
- In Interface Builder:
- Add Segue from Origin View Controller to Destination View Controller
- Add Segue Identifier
performSegue(withIdentifier: "throwDownPaper", sender: self)
Til next time,
lovelejess
at 21:33