Help with adjustsFontSizeToFitWidth?

0

When using the adjustsFontSizeToFitWidth in the second outlet I get error.

Does anyone know how to fix it?

Note: The second view controller is like the first, in the same class!

import UIKit

class ViewController: UIViewController {
    @IBOutlet weak var botaoIniciar: UIButton!
    @IBOutlet weak var botaoBrasil: UIButton!
    override func viewDidLoad() {    
        super.viewDidLoad()
        botaoIniciar.titleLabel?.adjustsFontSizeToFitWidth = true
        botaoIniciar.titleLabel?.baselineAdjustment = .alignCenters
        botaoBrasil.titleLabel?.adjustsFontSizeToFitWidth = true
        botaoBrasil.titleLabel?.baselineAdjustment = .alignCenters
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
}
    
asked by anonymous 30.11.2016 / 00:00

0 answers