Skip to content

Instantly share code, notes, and snippets.

@mauricioconde
Last active August 29, 2019 21:15
Show Gist options
  • Select an option

  • Save mauricioconde/1c6ab0af022516eaa15e to your computer and use it in GitHub Desktop.

Select an option

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
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