終止應用程序因未捕獲的異常[<__ NSCFString 0x7f8392695300> valueForUndefinedKey:]:該類不是密鑰名稱的密鑰值編碼。
NSUnknownKeyException '原因:'[< __NSCFString 0x7f8392695300> valueForUndefinedKey:]:這個類不是密鑰值編碼兼容的鍵名稱。
得到一個例外..我想顯示數據庫值泰伯維
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
// Dequeue the cell.
//static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"idCellRecord" forIndexPath:indexPath];
NSInteger indexOfFirstname = [self.dbManager.arrColumnNames indexOfObject:@"name"];
NSInteger indexOfLastname = [self.dbManager.arrColumnNames indexOfObject:@"fname"];
cell.textLabel.text = [NSString stringWithFormat:@ "%@ %@", [[self.arrPeopleInfo objectAtIndex:indexPath.row]valueForKey:@"name"], [[self.arrPeopleInfo objectAtIndex:indexPath.row] valueForKey:@"fname"]];
只是檢查你是否已經正確地將tableview設置爲同一類,數據源和委託以及 – channi
順便說一句你如何初始化UITableViewCell? 只需檢查NSInteger行上的斷點,如果單元格爲零 – channi