从今天起我在iOS 10上使用6s在Simulator上运行我的应用程序,但现在我在iPhone 7上运行它。当我按下Save
按钮时,它显示以下错误:{{1 }}
我的代码如下:
Thread 1: EXC_BREAKPOINT (code=1, subcode=0x000cfba4)
在iOS模拟器中,它可以正常工作,将@IBAction func SaveAction(_ sender: AnyObject) {
let dataString = DateTextfield.text
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "MMM d, yyyy"
// convert string into date
let dateValue:NSDate? = dateFormatter.date(from: dataString!) as NSDate?
let nowDouble = dateValue?.timeIntervalSince1970
let hey = Int64(nowDouble!*1000) //Here is the error
let newdouble = Double(hey)
MyArray[Work]!["Date"]?.append(newdouble)
}
正确保存到名为newdouble
的词典
如果我使用Build Configuration:Debug
运行应用程序MyArray