このコード スニペットの何が問題なのかを理解するのに苦労しています。これは現在 Objective-C で機能していますが、Swift ではメソッドの最初の行でクラッシュするだけです。コンソール ログにエラー メッセージが表示されます: Bad_Instruction
。
func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
var cell : UITableViewCell = tableView.dequeueReusableCellWithIdentifier("Cell") as UITableViewCell
if (cell == nil) {
cell = UITableViewCell(style: UITableViewCellStyle.Value1, reuseIdentifier: "Cell")
}
cell.textLabel.text = "TEXT"
cell.detailTextLabel.text = "DETAIL TEXT"
return cell
}