当我启动该应用程序时,我看到一个白屏并告诉我该错误,我该如何解决?该行中显示错误:

![myLabel.alpha = 0]

错误是线程1:EXC_BAD_INSTRUCTION(代码= EXC_I386_INVOP,子代码0x0)

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.
    }

最佳答案

您的@IBOutlet必须已经无效。也许您在连接后或其他原因重命名了它。您应该删除现有的,然后重新创建。请检查my answer in other thread on how to do this

关于ios - 当我启动该应用程序时,我看到一个白屏并告诉我该错误,我该如何解决?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44561662/

10-11 17:15