我有一个表格视图,它显示所有对象并且可以删除对象,现在我需要获取它,以便我可以从 NSMutableArray 编辑对象并保存和重新存储表格数据。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
AssignmentInfo *ai = [self.alist objectAtIndex:indexPath.row];
UILabel *classname = (UILabel *)[cell viewWithTag:1];
UILabel *assignementText = (UILabel *)[cell viewWithTag:2];
UILabel *date = (UILabel *)[cell viewWithTag:3];
classname.text = ai.className;
assignementText.text = ai.assignmentTitle;
date.text = ai.dateTimeString;
// Configure the cell...
return cell;
}
如果需要,这里是整个项目的链接: