当我启动应用程序时,我看到一个白色的屏幕,告诉我这个错误,我该如何解决?

时间:2017-06-15 07:48:13

标签: ios xcode

当我启动应用程序时,我看到一个白色屏幕并告诉我这个错误,我该如何解决?错误出现在这一行:

![myLabel.alpha = 0]

错误是线程1:EXC_BAD_INSTRUCTION(代码= EXC_I386_INVOP,subcode0x0)

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
          myLabel.alpha = 0
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

1 个答案:

答案 0 :(得分:2)

Your @IBOutlet must has become invalid. Maybe you rename it after connecting it or other reason. You should remove the existing one and recreate again.
Please check my answer in other thread on how to do this.

相关问题