Last active
June 12, 2017 18:57
-
-
Save barbosa/440fae2f856e765730455d34006f07d4 to your computer and use it in GitHub Desktop.
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 | |
| final class MyViewController: UIViewController { | |
| func loadView() { | |
| view = MyView.fromNib() | |
| } | |
| } | |
| final class MyView: UIView { | |
| @IBOutlet private(set) weak var myLabel: UILabel! { | |
| didSet { | |
| myLabel.textColor = .blue | |
| myLabel.text = "This is my label" | |
| } | |
| } | |
| @IBOutlet private(set) weak var otherView: UIView! { | |
| didSet { | |
| otherView.backgroundColor = .red | |
| otherView.layer.cornerRadius = 3.0 | |
| otherView.layer.masksToBounds = true | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment