Created
February 6, 2019 00:17
-
-
Save rldaulton/3aedfdf5c6e8a96b221d19509a27d750 to your computer and use it in GitHub Desktop.
An example of a mould, using a UILabel
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
// Mould | |
extension UILabel { | |
class var heading: UILabel { | |
let mould: UILabel = .init() | |
mould.font = .systemFont(ofSize: 18.0) | |
mould.textColor = .black | |
mould.translatesAutoresizingMaskIntoConstraints = false | |
return mould | |
} | |
} | |
//How to use | |
let headingLabel: UILabel = .heading |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment