Created
February 26, 2020 09:16
-
-
Save MoussaHellal/3e53b5e66f55d4aafb86a6563b28afa8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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