Last active
August 29, 2019 21:15
-
-
Save mauricioconde/1c6ab0af022516eaa15e to your computer and use it in GitHub Desktop.
iOS Programming. Cretate a Simple Table View App - View Controller for 'Detail note' view
This file contains hidden or 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
| import UIKit | |
| class DetailNoteViewController: UIViewController { | |
| @IBOutlet var titleLbl: UILabel! | |
| @IBOutlet var descLbl: UILabel! | |
| @IBOutlet var dateLbl: UILabel! | |
| @IBOutlet var iconImg: UIImageView! | |
| var note: Note! | |
| // MARK: - Life cycle | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| configureView() | |
| } | |
| // MARK:- Configuration | |
| func configureView(){ | |
| guard let note = note else { return } | |
| titleLbl.text = note.title | |
| descLbl.text = note.fullDesc | |
| dateLbl.text = note.formattedDate | |
| iconImg.image = UIImage(named: note.img) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment