0
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
let cell = tableView.dequeueReusableCellWithIdentifier("SearchTableViewCellIdentifier") as! SearchTableViewCell
var item = self.searchResult[indexPath.row] as? PFObject
cell.post = item
return cell
}
FUNC的tableView(的tableView:UITableView的,didSelectRowAtIndex的rowIndex:智力) {獲取錯誤處理表中選擇行的iOS迅速
let indexPath = tableView.indexPathForSelectedRow()
let currentCell = tableView.cellForRowAtIndexPath(indexPath!)! as UITableViewCell
println(currentCell.textLabel!.text)
}
我沒有得到實際的價值。我上打印currentCell.textLabel獲得零!.text區段
由於錯誤被刪除,但它無法正常工作。在選擇任何這種方法都沒有受到打擊。 – hatim
@hatim - 檢查更新的答案 –
它正在爲println打印nil(currentCell.textLabel!.text) – hatim