0
When using adjustsFontSizeToFitWidth in the second outlet I get error.
Does anyone know how to solve?
Note: The second view controller is 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.
}
}
Places the error being generated.
– Otávio
thread1: EXC_BAD_INTRUCTON (code=EXC+I386_INVOP, subcode=0x0)
– Celso Costa Kawakami
but only happens pro because the second viewcontroller be in the class of that document Swift , the first boot that is in the first viewcontroller is running normal ! baseline tbm does not wheel ! will I have to use some delegate method
– Celso Costa Kawakami
I believe the error lies in the storyboard
– Brenno Hayden