Skip to content

Instantly share code, notes, and snippets.

@jimrutherford
Created September 4, 2016 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimrutherford/8d3728fd65351f57061af934fb030e14 to your computer and use it in GitHub Desktop.
Save jimrutherford/8d3728fd65351f57061af934fb030e14 to your computer and use it in GitHub Desktop.
import UIKit
@IBDesignable
public class DarkHeadingLabel: UILabel {
override public init(frame: CGRect) {
super.init(frame: frame)
applyStyle()
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
applyStyle()
}
override public func prepareForInterfaceBuilder() {
applyStyle()
}
func applyStyle() {
self.textColor = Styles.Colors.DarkText.color()
self.font = Styles.Fonts.HeadingFont.font()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment