exc_bad_instruction(code = exc_i386_invop subcode = 0x0)

时间:2016-07-30 16:27:22

标签: ios swift

所以这是我运行此函数并出现此错误的问题

exc_bad_instruction(code = exc_i386_invop subcode = 0x0) 所以我尝试添加自己,但我仍然得到一个错误 不要将此标记为重复,因为它与其他问题不同

func hp()
{    
if haspused == false
{


   pausemen.alpha = 1
   pausemen.alpha = 1
   pausebtnho.alpha = 1




    haspused = true
}
else
{
    UIView.animateWithDuration(2, animations:
        {

            self.pausebtn1.alpha = 0
            self.pausemen.alpha = 0
            self.pausebtnho.alpha = 0
    })

    haspused = false
}
}

我尝试更新到Swift 2但是没有用 还挂了is = false 在控制台中有这条消息

 fatal error: unexpectedly found nil while unwrapping an Optional value
 (lldb) 

这是出口

 @IBOutlet weak var pausebtnho: UIButton!
 @IBOutlet weak var pausebtn1: UIButton!
 @IBOutlet weak var pausemen: UILabel!

0 个答案:

没有答案