当我启动应用程序时,我看到一个白屏并告诉我这个错误,我该如何解决?错误出现在这一行:
![我的标签.alpha = 0]
错误是线程 1:EXC_BAD_INSTRUCTION(code=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.
}
最佳答案
您的@IBOutlet 必须已失效。也许你在连接它或其他原因后重命名它。您应该删除现有的并重新创建。
请查看my answer in other thread on how to do this .
关于ios - 当我启动应用程序时,我看到一个白屏并告诉我这个错误,我该如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44561662/