-
Notifications
You must be signed in to change notification settings - Fork 0
CRUD
katsuyoshi edited this page Sep 13, 2010
·
5 revisions
See sample project ISCDTableViewControllersSample
- Prepare your Core Data model.
- Create custom class of NSManagedObject.
- Implement this code on your application delegate class.
First 3 lines are important.
- (void)applicationDidFinishLaunching:(UIApplication *)application {
ISCDListTableViewController *tableViewController = [[[ISCDListTableViewController alloc] initWithStyle:UITableViewStylePlain] autorelease];
tableViewController.displayKey = @"name";
tableViewController.entityName = @"ISStudio";
navigationController = [[UINavigationController alloc] initWithRootViewController:tableViewController];
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
}
ISCDListTableViewController manages
showing list of objects,
adding a new object, reordering objects(required ‘position’ attribute) and deleting an object.
When you touch a cell, it shows a detail view(ISCDDetailedTableViewController) automatically.
Touch a cell in editing mode, you can edit attributes of selected object.
NOTE: Currently support text attribute only.
Other informations, written in Japanese [Transrate to English by google]