首页 > Optional value

Optional value

let cell = self.tableView.dequeueReusableCellWithIdentifier("todoCell")! as UITableViewCell
程序在这个句中奔溃
报错信息:unexpectedly found nil while unwrapping an Optional value


let cell = self.tableView.dequeueReusableCellWithIdentifier("todoCell") as! UITableViewCell
或者
let cell = self.tableView.dequeueReusableCellWithIdentifier("todoCell") as? UITableViewCell
【热门文章】
【热门文章】