Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esminc/CRUDViewTemplate
This tool is a CRUD base view template for Core Data on iPhone SDK.
https://github.com/esminc/CRUDViewTemplate
Last synced: 3 days ago
JSON representation
This tool is a CRUD base view template for Core Data on iPhone SDK.
- Host: GitHub
- URL: https://github.com/esminc/CRUDViewTemplate
- Owner: esminc
- License: mit
- Created: 2009-07-31T09:21:36.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2009-07-31T09:30:47.000Z (over 15 years ago)
- Last Synced: 2023-04-10T16:27:10.554Z (over 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 123 KB
- Stars: 6
- Watchers: 44
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
- awesome - CRUDViewTemplate - This tool is a CRUD base view template for Core Data on iPhone SDK. (etc)
- awesome - CRUDViewTemplate - This tool is a CRUD base view template for Core Data on iPhone SDK. (etc)
README
INTRODUCTION
This tool is a CRUD base view template for Core Data on iPhone SDK.
LEGAL
CrudViewTemplate is copyrighted open-source software
that is released under the MIT Lincence.
For details on the lisence, see the LICENSE file.INSTALLATION
1. shutdown Xcode.
2. command make & install.
$ ./make_template
$ ./install_templateHOW TO USE
1. startup Xcode.
2. generate any "Navigation-based Application (use Core Data)" project. (e.g. named 'CustomerManagement')
3. make any Model.
(e.g. CustomerManagement.xcdatamodel)
entity 'Customer' has attributes
'name' as String, default value is 'new'
'signupDay' as Date. default value is '2000-01-01 00:00:00 +9000'4. select "Classes" group & open "New Files" & select "User Templates" - "Cocoa Touch Class".
5. generate "CrudViewController subclass". (e.g. named 'CustomerViewController')
6. import CrudViewController subclass.
(e.g. CustomerManagementAppDelegate.m)#import "CustomerViewController.h"
7. setup ListedViewController.
(e.g. - applicationDidFinishLaunching:)//// initialize
ListedCustomerViewController *listViewController = [[ListedCustomerViewController alloc] init];
//// set up FetchedResultController
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Customer" inManagedObjectContext:self.managedObjectContext];
[fetchRequest setEntity:entity];
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES];
NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
[fetchRequest setSortDescriptors:sortDescriptors];
NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:nil cacheName:@"Root"];
listViewController.fetchedResultsController = aFetchedResultsController;
//// push to NavigationController
[navigationController pushViewController:listViewController animated:YES];[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
8. run, so application show CRUD view.UNINSTRATION
1. shutdown Xcode.
2. command make & install.
$ ./uninstall_template