Skip to content

Instantly share code, notes, and snippets.

@Ingelheim
Created April 23, 2018 11:31
Show Gist options
  • Save Ingelheim/c29c1e310716318344fcc89769665c10 to your computer and use it in GitHub Desktop.
Save Ingelheim/c29c1e310716318344fcc89769665c10 to your computer and use it in GitHub Desktop.
import UIKit
class ImageInformationViewController : UIViewController {
@IBOutlet weak var nameLabel: UILabel!
@IBOutlet weak var imageView: UIImageView!
@IBOutlet weak var descriptionText: UITextView!
var imageInformation : ImageInformation?
override func viewDidLoad() {
super.viewDidLoad()
if let actualImageInformation = imageInformation {
self.nameLabel.text = actualImageInformation.name
self.imageView.image = actualImageInformation.image
self.descriptionText.text = actualImageInformation.description
}
}
@IBAction func dismissView(_ sender: Any) {
self.dismiss(animated: true, completion: nil)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment