Skip to content

Commit

Permalink
Improving auto-adjust fittable label
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Baranes committed Mar 29, 2016
1 parent 839e908 commit ef14f3d
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Source/FittableFontLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,21 @@ import UIKit

// MARK: Life cycle

override init(frame: CGRect) {
super.init(frame: frame)
public override func prepareForInterfaceBuilder() {
super.prepareForInterfaceBuilder()
adjustFontSize()
}

required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
public override func awakeFromNib() {
super.awakeFromNib()
adjustFontSize()
}


public override func layoutSubviews() {
super.layoutSubviews()
adjustFontSize()
}

// MARK:

private func adjustFontSize() {
Expand Down

0 comments on commit ef14f3d

Please sign in to comment.