From 52c6a025228838a0e97a3af39f5ef1b90d43f53a Mon Sep 17 00:00:00 2001 From: Eddie Ehlin Date: Sat, 5 Jan 2013 12:04:06 +0100 Subject: Renamed/refactored iBeanListViewController to BeanCollectionListViewController + changed extractionCounter to extractionCount in BeanCollection entity --- iBean/iBean.xcodeproj/project.pbxproj | 36 ++--- .../UserInterfaceState.xcuserstate | Bin 25626 -> 26695 bytes iBean/iBean/Bean.h | 2 +- iBean/iBean/Bean.m | 2 +- iBean/iBean/BeanCollection.h | 8 +- iBean/iBean/BeanCollection.m | 8 +- iBean/iBean/BeanCollectionListViewController.h | 23 +++ iBean/iBean/BeanCollectionListViewController.m | 175 +++++++++++++++++++++ .../iBean.xcdatamodeld/iBean.xcdatamodel/contents | 6 +- iBean/iBean/iBeanListViewController.h | 23 --- iBean/iBean/iBeanListViewController.m | 175 --------------------- iBean/iBean/iPhoneStoryboard.storyboard | 7 +- 12 files changed, 231 insertions(+), 234 deletions(-) create mode 100644 iBean/iBean/BeanCollectionListViewController.h create mode 100644 iBean/iBean/BeanCollectionListViewController.m delete mode 100644 iBean/iBean/iBeanListViewController.h delete mode 100644 iBean/iBean/iBeanListViewController.m (limited to 'iBean') diff --git a/iBean/iBean.xcodeproj/project.pbxproj b/iBean/iBean.xcodeproj/project.pbxproj index 264aee4..d859d0c 100644 --- a/iBean/iBean.xcodeproj/project.pbxproj +++ b/iBean/iBean.xcodeproj/project.pbxproj @@ -22,9 +22,9 @@ 020C55C41691059800D8224C /* InstaBeanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55C31691059800D8224C /* InstaBeanViewController.m */; }; 020C55C716910EAD00D8224C /* InstaBeanConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55C616910EAD00D8224C /* InstaBeanConfiguration.m */; }; 020C55CA1691100000D8224C /* AppDelegate+Storage.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55C91691100000D8224C /* AppDelegate+Storage.m */; }; - 020C55DA1695CAD200D8224C /* iBeanListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55D91695CAD200D8224C /* iBeanListViewController.m */; }; - 020C55EF1697970200D8224C /* Bean.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55EE1697970200D8224C /* Bean.m */; }; - 020C55F21697970200D8224C /* BeanCollection.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55F11697970200D8224C /* BeanCollection.m */; }; + 020C55FA16983E9900D8224C /* BeanCollectionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55F916983E9900D8224C /* BeanCollectionListViewController.m */; }; + 020C55FD16983F7400D8224C /* Bean.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55FC16983F7400D8224C /* Bean.m */; }; + 020C560016983F7400D8224C /* BeanCollection.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55FF16983F7400D8224C /* BeanCollection.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -50,12 +50,12 @@ 020C55C616910EAD00D8224C /* InstaBeanConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstaBeanConfiguration.m; sourceTree = ""; }; 020C55C81691100000D8224C /* AppDelegate+Storage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+Storage.h"; sourceTree = ""; }; 020C55C91691100000D8224C /* AppDelegate+Storage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+Storage.m"; sourceTree = ""; }; - 020C55D81695CAD200D8224C /* iBeanListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iBeanListViewController.h; sourceTree = ""; }; - 020C55D91695CAD200D8224C /* iBeanListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iBeanListViewController.m; sourceTree = ""; }; - 020C55ED1697970200D8224C /* Bean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bean.h; sourceTree = ""; }; - 020C55EE1697970200D8224C /* Bean.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Bean.m; sourceTree = ""; }; - 020C55F01697970200D8224C /* BeanCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BeanCollection.h; sourceTree = ""; }; - 020C55F11697970200D8224C /* BeanCollection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BeanCollection.m; sourceTree = ""; }; + 020C55F816983E9900D8224C /* BeanCollectionListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BeanCollectionListViewController.h; sourceTree = ""; }; + 020C55F916983E9900D8224C /* BeanCollectionListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BeanCollectionListViewController.m; sourceTree = ""; }; + 020C55FB16983F7400D8224C /* Bean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bean.h; sourceTree = ""; }; + 020C55FC16983F7400D8224C /* Bean.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Bean.m; sourceTree = ""; }; + 020C55FE16983F7400D8224C /* BeanCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BeanCollection.h; sourceTree = ""; }; + 020C55FF16983F7400D8224C /* BeanCollection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BeanCollection.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -153,9 +153,9 @@ 020C55D31695C2C800D8224C /* iBean */ = { isa = PBXGroup; children = ( + 020C55F816983E9900D8224C /* BeanCollectionListViewController.h */, + 020C55F916983E9900D8224C /* BeanCollectionListViewController.m */, 020C55DF169792F800D8224C /* Data */, - 020C55D81695CAD200D8224C /* iBeanListViewController.h */, - 020C55D91695CAD200D8224C /* iBeanListViewController.m */, ); name = iBean; sourceTree = ""; @@ -163,10 +163,10 @@ 020C55DF169792F800D8224C /* Data */ = { isa = PBXGroup; children = ( - 020C55F01697970200D8224C /* BeanCollection.h */, - 020C55F11697970200D8224C /* BeanCollection.m */, - 020C55ED1697970200D8224C /* Bean.h */, - 020C55EE1697970200D8224C /* Bean.m */, + 020C55FE16983F7400D8224C /* BeanCollection.h */, + 020C55FF16983F7400D8224C /* BeanCollection.m */, + 020C55FB16983F7400D8224C /* Bean.h */, + 020C55FC16983F7400D8224C /* Bean.m */, ); name = Data; sourceTree = ""; @@ -243,9 +243,9 @@ 020C55C41691059800D8224C /* InstaBeanViewController.m in Sources */, 020C55C716910EAD00D8224C /* InstaBeanConfiguration.m in Sources */, 020C55CA1691100000D8224C /* AppDelegate+Storage.m in Sources */, - 020C55DA1695CAD200D8224C /* iBeanListViewController.m in Sources */, - 020C55EF1697970200D8224C /* Bean.m in Sources */, - 020C55F21697970200D8224C /* BeanCollection.m in Sources */, + 020C55FA16983E9900D8224C /* BeanCollectionListViewController.m in Sources */, + 020C55FD16983F7400D8224C /* Bean.m in Sources */, + 020C560016983F7400D8224C /* BeanCollection.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate b/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate index 170f786..3b8c0b6 100644 Binary files a/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate and b/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/iBean/iBean/Bean.h b/iBean/iBean/Bean.h index d42a98f..80094b3 100644 --- a/iBean/iBean/Bean.h +++ b/iBean/iBean/Bean.h @@ -13,9 +13,9 @@ @interface Bean : NSManagedObject -@property (nonatomic, retain) NSString * name; @property (nonatomic, retain) NSNumber * amount; @property (nonatomic, retain) NSNumber * grindSetting; +@property (nonatomic, retain) NSString * name; @property (nonatomic, retain) BeanCollection *beanCollection; @end diff --git a/iBean/iBean/Bean.m b/iBean/iBean/Bean.m index e9b85fa..fbb21b3 100644 --- a/iBean/iBean/Bean.m +++ b/iBean/iBean/Bean.m @@ -12,9 +12,9 @@ @implementation Bean -@dynamic name; @dynamic amount; @dynamic grindSetting; +@dynamic name; @dynamic beanCollection; @end diff --git a/iBean/iBean/BeanCollection.h b/iBean/iBean/BeanCollection.h index 73f935d..801fa4c 100644 --- a/iBean/iBean/BeanCollection.h +++ b/iBean/iBean/BeanCollection.h @@ -13,12 +13,12 @@ @interface BeanCollection : NSManagedObject -@property (nonatomic, retain) NSString * name; -@property (nonatomic, retain) NSNumber * extractionTime; @property (nonatomic, retain) NSDate * created; -@property (nonatomic, retain) NSNumber * extractionCounter; -@property (nonatomic, retain) NSString * note; +@property (nonatomic, retain) NSNumber * extractionCount; +@property (nonatomic, retain) NSNumber * extractionTime; @property (nonatomic, retain) NSDate * modified; +@property (nonatomic, retain) NSString * name; +@property (nonatomic, retain) NSString * note; @property (nonatomic, retain) NSSet *beans; @end diff --git a/iBean/iBean/BeanCollection.m b/iBean/iBean/BeanCollection.m index cfeceda..39107ba 100644 --- a/iBean/iBean/BeanCollection.m +++ b/iBean/iBean/BeanCollection.m @@ -12,12 +12,12 @@ @implementation BeanCollection -@dynamic name; -@dynamic extractionTime; @dynamic created; -@dynamic extractionCounter; -@dynamic note; +@dynamic extractionCount; +@dynamic extractionTime; @dynamic modified; +@dynamic name; +@dynamic note; @dynamic beans; @end diff --git a/iBean/iBean/BeanCollectionListViewController.h b/iBean/iBean/BeanCollectionListViewController.h new file mode 100644 index 0000000..a433417 --- /dev/null +++ b/iBean/iBean/BeanCollectionListViewController.h @@ -0,0 +1,23 @@ +// +// BeanCollectionListViewController.h +// iBean +// +// Created by Eddie Ehlin on 2013-01-03. +// Copyright (c) 2013 Eddie Ehlin. All rights reserved. +// + +#import + +@interface BeanCollectionListViewController : UITableViewController + +@property (nonatomic, strong) NSArray *beanCollections; + +/* Utility methods */ +- (void) initViewController; + +/* UI Outlets */ + + +/* UI Actions */ + +@end diff --git a/iBean/iBean/BeanCollectionListViewController.m b/iBean/iBean/BeanCollectionListViewController.m new file mode 100644 index 0000000..3869497 --- /dev/null +++ b/iBean/iBean/BeanCollectionListViewController.m @@ -0,0 +1,175 @@ +// +// BeanCollectionListViewController.m +// iBean +// +// Created by Eddie Ehlin on 2013-01-03. +// Copyright (c) 2013 Eddie Ehlin. All rights reserved. +// + +#import "BeanCollectionListViewController.h" +#import "BeanCollection.h" +#import "AppDelegate+Storage.h" + +@interface BeanCollectionListViewController () + +@end + +@implementation BeanCollectionListViewController + +- (id)initWithStyle:(UITableViewStyle)style +{ + self = [super initWithStyle:style]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + NSLog(@"BeanCollectionListViewController view's loaded!"); + + + // Uncomment the following line to preserve selection between presentations. + // self.clearsSelectionOnViewWillAppear = NO; + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem; +} + +- (void) viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + [self initViewController]; + + //TODO: Rollback if view is "backed" to from add-state, so that nothing gets saved...that shouldn't be saved. +} + +- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender +{ + if ([segue.identifier isEqualToString:@"AddNewStep1Segue"]) + { + NSLog(@"Going to Add new - Step 1"); + //TODO: Create new bean collection object (managed context object) and push it through the segue + //to the next view controller! + //segue.destinationViewController Points to next view controller! Fetch it and add/set the bean collection object to use. + } +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + // Return the number of sections. + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + // Return the number of rows in the section (we only have one section). + return self.beanCollections.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *CellIdentifier = @"BeanCollectionCell"; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; + + //Configure the cell and set its title + BeanCollection *currentCollection = [self.beanCollections objectAtIndex:indexPath.row]; + cell.textLabel.text = currentCollection.name; + + return cell; +} + + +// Override to support conditional editing of the table view. +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath +{ + // Return NO if you do not want the specified item to be editable (we want to be able to REMOVE though). + return YES; +} + +// Override to support editing the table view. +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath +{ + if (editingStyle == UITableViewCellEditingStyleDelete) { + // Delete the row from the data source + if (self.beanCollections != nil) + { + if ([(AppDelegate*) [[UIApplication sharedApplication] delegate] deleteObject:[self.beanCollections objectAtIndex:indexPath.row]] != nil) + { + NSLog(@"deleteObject returned an error when deleting bean collection!"); +#warning TODO: Handle deletion error!? + } + else + { + //Reload our bean collections array from storage (since it is no longer consistent) + self.beanCollections = [(AppDelegate*) [[UIApplication sharedApplication] delegate] getBeanCollections]; + } + } + [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; + } + else if (editingStyle == UITableViewCellEditingStyleInsert) { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } +} + +/* +// Override to support rearranging the table view. +- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath +{ +} +*/ + +/* +// Override to support conditional rearranging of the table view. +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath +{ + // Return NO if you do not want the item to be re-orderable. + return YES; +} +*/ + +#pragma mark - Table view delegate + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + // Navigation logic may go here. Create and push another view controller. + /* + <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; + // ... + // Pass the selected object to the new view controller. + [self.navigationController pushViewController:detailViewController animated:YES]; + */ +} + + +/***************************************************** + Utility methods + *****************************************************/ +- (void) initViewController +{ + NSLog(@"BeanCollectionListViewController - initViewController"); + + //Load bean collections from core data storage + self.beanCollections = [(AppDelegate*) [[UIApplication sharedApplication] delegate] getBeanCollections]; + if (self.beanCollections != nil) + { + [self.tableView reloadData]; + } +} + +/***************************************************** + UI Actions + *****************************************************/ +#pragma mark - IBActions + +@end diff --git a/iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents b/iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents index cbceae9..4677f93 100644 --- a/iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents +++ b/iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents @@ -8,7 +8,7 @@ - + @@ -19,8 +19,8 @@ - - + + \ No newline at end of file diff --git a/iBean/iBean/iBeanListViewController.h b/iBean/iBean/iBeanListViewController.h deleted file mode 100644 index f0a76b9..0000000 --- a/iBean/iBean/iBeanListViewController.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// iBeanListViewController.h -// iBean -// -// Created by Eddie Ehlin on 2013-01-03. -// Copyright (c) 2013 Eddie Ehlin. All rights reserved. -// - -#import - -@interface iBeanListViewController : UITableViewController - -@property (nonatomic, strong) NSArray *beanCollections; - -/* Utility methods */ -- (void) initViewController; - -/* UI Outlets */ - - -/* UI Actions */ - -@end diff --git a/iBean/iBean/iBeanListViewController.m b/iBean/iBean/iBeanListViewController.m deleted file mode 100644 index ac97a10..0000000 --- a/iBean/iBean/iBeanListViewController.m +++ /dev/null @@ -1,175 +0,0 @@ -// -// iBeanListViewController.m -// iBean -// -// Created by Eddie Ehlin on 2013-01-03. -// Copyright (c) 2013 Eddie Ehlin. All rights reserved. -// - -#import "iBeanListViewController.h" -#import "BeanCollection.h" -#import "AppDelegate+Storage.h" - -@interface iBeanListViewController () - -@end - -@implementation iBeanListViewController - -- (id)initWithStyle:(UITableViewStyle)style -{ - self = [super initWithStyle:style]; - if (self) { - // Custom initialization - } - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - NSLog(@"iBeanListViewController view's loaded!"); - - - // Uncomment the following line to preserve selection between presentations. - // self.clearsSelectionOnViewWillAppear = NO; - - // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem; -} - -- (void) viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - [self initViewController]; - - //TODO: Rollback if view is "backed" to from add-state, so that nothing gets saved...that shouldn't be saved. -} - -- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender -{ - if ([segue.identifier isEqualToString:@"AddNewStep1Segue"]) - { - NSLog(@"Going to Add new - Step 1"); - //TODO: Create new bean collection object (managed context object) and push it through the segue - //to the next view controller! - //segue.destinationViewController Points to next view controller! Fetch it and add/set the bean collection object to use. - } -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -#pragma mark - Table view data source - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - // Return the number of sections. - return 1; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - // Return the number of rows in the section (we only have one section). - return self.beanCollections.count; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - static NSString *CellIdentifier = @"BeanCollectionCell"; - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; - - //Configure the cell and set its title - BeanCollection *currentCollection = [self.beanCollections objectAtIndex:indexPath.row]; - cell.textLabel.text = currentCollection.name; - - return cell; -} - - -// Override to support conditional editing of the table view. -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath -{ - // Return NO if you do not want the specified item to be editable (we want to be able to REMOVE though). - return YES; -} - -// Override to support editing the table view. -- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath -{ - if (editingStyle == UITableViewCellEditingStyleDelete) { - // Delete the row from the data source - if (self.beanCollections != nil) - { - if ([(AppDelegate*) [[UIApplication sharedApplication] delegate] deleteObject:[self.beanCollections objectAtIndex:indexPath.row]] != nil) - { - NSLog(@"deleteObject returned an error when deleting bean collection!"); -#warning TODO: Handle deletion error!? - } - else - { - //Reload our bean collections array from storage (since it is no longer consistent) - self.beanCollections = [(AppDelegate*) [[UIApplication sharedApplication] delegate] getBeanCollections]; - } - } - [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; - } - else if (editingStyle == UITableViewCellEditingStyleInsert) { - // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view - } -} - -/* -// Override to support rearranging the table view. -- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath -{ -} -*/ - -/* -// Override to support conditional rearranging of the table view. -- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath -{ - // Return NO if you do not want the item to be re-orderable. - return YES; -} -*/ - -#pragma mark - Table view delegate - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - // Navigation logic may go here. Create and push another view controller. - /* - <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; - // ... - // Pass the selected object to the new view controller. - [self.navigationController pushViewController:detailViewController animated:YES]; - */ -} - - -/***************************************************** - Utility methods - *****************************************************/ -- (void) initViewController -{ - NSLog(@"iBeanListViewController - initViewController"); - - //Load bean collections from core data storage - self.beanCollections = [(AppDelegate*) [[UIApplication sharedApplication] delegate] getBeanCollections]; - if (self.beanCollections != nil) - { - [self.tableView reloadData]; - } -} - -/***************************************************** - UI Actions - *****************************************************/ -#pragma mark - IBActions - -@end diff --git a/iBean/iBean/iPhoneStoryboard.storyboard b/iBean/iBean/iPhoneStoryboard.storyboard index aca958d..cfa726d 100644 --- a/iBean/iBean/iPhoneStoryboard.storyboard +++ b/iBean/iBean/iPhoneStoryboard.storyboard @@ -4,10 +4,10 @@ - + - + @@ -436,9 +436,6 @@ - - - -- cgit v1.2.3