我正在阅读文档以了解如何在表格视图中添加一行,我发现了这个例子:
- (void)save:sender {
UITextField *textField = [(EditableTableViewTextField *)[tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]] textField];
SimpleEditableListAppDelegate *controller = (SimpleEditableListAppDelegate *)[[UIApplication sharedApplication] delegate];
NSString *newItem = textField.text;
if (newItem != nil) {
[controller insertObject:newItem inListAtIndex:[controller countOfList]];
}
[self dismissModalViewControllerAnimated:YES];
}
我不明白该方法:insertObject:inListAtIndex:
或[[UIApplication sharedApplication] delegate];
代表什么;我们是否将数据放入 plist 文件中?有人可以向我解释一下吗?文档并没有真正的帮助。UIApplication