0
在運行應用程序,我得到錯誤:我有錯誤,當我跑我的應用程序
Thread:1 EXC_BAD_INSTRUCTION(code=EXC_1386_INVOP, subcode=0×0)
我的代碼:
NotificationManager.updateNotif(params){
(result:Bool) in
if result {
cell.backgroundColor = UIColor.whiteColor()
// バッジを-1に
let val = NotificationManager.sharedInstance.notifTabbar.badgeValue
if Int(val!)!/*val?.toInt()*/ > 0 {
let badgStr = Int(val!)!/*val!.toInt()!*/ - 1
if badgStr == 0 {
NotificationManager.sharedInstance.notifTabbar.badgeValue = nil
UIApplication.sharedApplication().applicationIconBadgeNumber = 0
}
else{
NotificationManager.sharedInstance.notifTabbar.badgeValue = String(stringInterpolationSegment: badgStr)
UIApplication.sharedApplication().applicationIconBadgeNumber = badgStr
是的,我們將需要更多的信息。你期待什麼結果?它在哪裏崩潰? –
我正在做yik犛牛克隆,然後當我點擊「我」中的通知評論時,它發生了。 – stack0101
「If Int(val!)!> 0」 – stack0101