Vote count: 0 I just can not figure this out : print(module) print(Globals.sharedInstance.dataModuleName) let kind:NSString = module[Globals.sharedInstance.dataModuleName] as! NSString Will print this, and then crash for strange reason : ( //dic print { meta = no; module = IN; subject = LT; variable = A2; } ) module // print the right field we are looking for inside the dictionary . fatal error: unexpectedly found nil while unwrapping an Optional value But you can see that module is valid dictionary and also dataModuleName . Crashing on the line let kind . whats wrong with it ? asked 1 min agoCuelious Let's block ads! بخوانید...
ادامه مطلبVote count: -1 I know this is an error a lot of people get and I know what it means, but for this matter i'm not able to fix/debug it. I have a table view with a custom cell. Once you select a row, some things will happen. Once the row gets deselected, some other things will happen. This all works fine, but there is one bug I can't fix. I can tap on every row I want and 'nothing' happens, but if I tap on the second row and then the last row or the other way around I get this error: unexpectedly found nil while unwrapping an Optional value The LLDB showed me where the error occurred and it should be in this line of code: let cell = tableView.cellForRowAtIndexPath(indexPath) as! TaskViewerCell...
ادامه مطلبVote count: 0 my codes are as below, but i'm getting an error the same as the title for the line commented out. i tried optional binding but still isn't working. i'm already updating the dates array in viewDidLoad so not sure why its found nil, any idea? Thanks! func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = myTableView.dequeueReusableCellWithIdentifier("logCell", forIndexPath: indexPath) as! logViewCell let dateFormatter = NSDateFormatter() dateFormatter.dateFormat = "dd-MMM-yy" // cell.date.text = dateFormatter.stringFromDate(dates[indexPath.row]) } asked 2 mins agoH. Lamb This entry passed through the Full-Text RSS serv...
ادامه مطلب