Skip to content

Instantly share code, notes, and snippets.

@MoussaHellal
Created February 26, 2020 09:16
Show Gist options
  • Save MoussaHellal/3e53b5e66f55d4aafb86a6563b28afa8 to your computer and use it in GitHub Desktop.
Save MoussaHellal/3e53b5e66f55d4aafb86a6563b28afa8 to your computer and use it in GitHub Desktop.
class MainViewController: UIViewController, ChoosePlanetMoonDelegate {
@IBOutlet weak var mainPlanetImage: UIImageView!
@IBOutlet weak var changeButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func changeButtonDidTapped(_ sender: Any) {
let chooseVC = storyboard?.instantiateViewController(identifier: "chooseVC") as! ChooseViewController
chooseVC.modalPresentationStyle = .fullScreen
self.present(chooseVC, animated: true, completion: nil)
}
func didChoosePlanetWith(image: UIImage) {
mainPlanetImage.image = image
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment