错误,而#34; numberOfLines"

时间:2017-04-08 14:54:11

标签: ios swift exc-bad-instruction

class ViewController: UIViewController {
    @IBOutlet weak var btn: UIButton!
    override func viewDidLoad() {
        // Error on following line: "Thread 1: EXC_BAD_INSTRUCTION"
        btn.titleLabel?.numberOfLines = 1;
        btn.titleLabel?.adjustsFontSizeToFitWidth = true
        btn.titleLabel?.lineBreakMode = .byClipping
        super.viewDidLoad()
    }
}

我该怎么办?甚至我的模拟器在发生此错误时也不会打开。

0 个答案:

没有答案