From ac1de8f5356878226e38a45085a351dd9b7a8cef Mon Sep 17 00:00:00 2001 From: Eddie Ehlin Date: Mon, 14 Jan 2013 22:11:36 +0100 Subject: Minor cleanup --- .../UserInterfaceState.xcuserstate | Bin 34948 -> 34539 bytes .../xcdebugger/Breakpoints.xcbkptlist | 15 +++++++++++++++ iBean/iBean/AddBeanViewController.m | 12 ------------ iBean/iBean/BeanCollectionBeanListViewController.m | 14 -------------- iBean/iBean/BeanCollectionInfoViewController.m | 8 ++++++-- iBean/iBean/BeanCollectionListViewController.m | 4 ++-- iBean/iBean/EditBeanViewController.m | 12 ------------ 7 files changed, 23 insertions(+), 42 deletions(-) (limited to 'iBean') 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 59502e2..b35e28b 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.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist index 05301bc..443de6d 100644 --- a/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist +++ b/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist @@ -2,4 +2,19 @@ + + + + diff --git a/iBean/iBean/AddBeanViewController.m b/iBean/iBean/AddBeanViewController.m index a6dc11c..1d8a9da 100644 --- a/iBean/iBean/AddBeanViewController.m +++ b/iBean/iBean/AddBeanViewController.m @@ -62,18 +62,6 @@ self.grinderSettingStepper.value = [grinderSetting doubleValue]; } } - - if (self.editMode == YES) - { - //TODO: Update UI to refelect edit mode. - - //+ set UI controls with values from beanCollection. - NSLog(@"AddBeanViewController - in edit state"); - } - else - { - NSLog(@"AddBeanViewController - in add new state"); - } } - (void) initWithModeAndBeanCollection:(BOOL)editMode: (BeanCollection*) bc diff --git a/iBean/iBean/BeanCollectionBeanListViewController.m b/iBean/iBean/BeanCollectionBeanListViewController.m index a7b39c8..caddd35 100644 --- a/iBean/iBean/BeanCollectionBeanListViewController.m +++ b/iBean/iBean/BeanCollectionBeanListViewController.m @@ -54,8 +54,6 @@ //Pass on the edit/add state and bean collection AddBeanViewController *beanViewController = segue.destinationViewController; [beanViewController initWithModeAndBeanCollection:self.editMode :self.beanCollection]; - - //TODO: Check what last grinder setting was (last bean) and pre set it } else if ([segue.identifier isEqualToString:@"EditBeanSegue"]) { @@ -81,18 +79,6 @@ //Load beans into the table view. [self.beanListTableView reloadData]; - - if (self.editMode == YES) - { - //TODO: Update UI to refelect edit mode. - - //+ set UI controls with values from beanCollection. - NSLog(@"BeanCollectionBeanListViewController - in edit state"); - } - else - { - NSLog(@"BeanCollectionBeanListViewController - in add new state"); - } } - (void) initWithModeAndBeanCollection:(BOOL)editMode: (BeanCollection*) bc diff --git a/iBean/iBean/BeanCollectionInfoViewController.m b/iBean/iBean/BeanCollectionInfoViewController.m index e9c9b95..d8d9cf9 100644 --- a/iBean/iBean/BeanCollectionInfoViewController.m +++ b/iBean/iBean/BeanCollectionInfoViewController.m @@ -109,6 +109,10 @@ self.beanCollectionNameTextField.text = self.beanCollection.name; self.beanCollectionNoteTextView.text = self.beanCollection.note; } + else + { + NSLog(@"BeanCollectionInfoViewController - initViewController in edit state, but bean collection is null!"); + } NSLog(@"BeanCollectionInfoViewController - in edit state"); } else @@ -163,8 +167,8 @@ - (void) cancelBeanCollection:(id)sender { UIAlertView *confirmCancel = [[UIAlertView alloc] - initWithTitle:@"Cancel?" - message:@"Are you sure you want to cancel?\n(Data entered will be lost)" + initWithTitle:self.editMode ? @"Cancel changes?" : @"Cancel bean collection?" + message:self.editMode ? @"Are you sure you want to cancel?\n(Changes entered will be lost)" : @"Are you sure you want to cancel?\n(Bean collection will be lost)" delegate:self cancelButtonTitle:@"Yes" otherButtonTitles:@"No", nil]; [confirmCancel show]; diff --git a/iBean/iBean/BeanCollectionListViewController.m b/iBean/iBean/BeanCollectionListViewController.m index 236b086..5bb9b44 100644 --- a/iBean/iBean/BeanCollectionListViewController.m +++ b/iBean/iBean/BeanCollectionListViewController.m @@ -56,9 +56,9 @@ self.beanCollection = [(AppDelegate*) [[UIApplication sharedApplication] delegate] createBeanCollection]; [infoViewController initWithModeAndBeanCollection:NO :self.beanCollection]; } - else if ([segue.identifier isEqualToString:@"EditBeanCollectionInfoSegue"]) + else if ([segue.identifier isEqualToString:@"ViewBeanCollectionInfoSegue"]) { - //Tell the view controller that we'll be handling an existing bean collection + //Tell the view controller that we'll be handling/viewing an existing bean collection BeanCollectionInfoViewController *infoViewController = segue.destinationViewController; self.beanCollection = [self.beanCollections objectAtIndex:[self.tableView indexPathForSelectedRow].row]; [infoViewController initWithModeAndBeanCollection:YES :self.beanCollection]; diff --git a/iBean/iBean/EditBeanViewController.m b/iBean/iBean/EditBeanViewController.m index 59b3d8d..e57b470 100644 --- a/iBean/iBean/EditBeanViewController.m +++ b/iBean/iBean/EditBeanViewController.m @@ -61,18 +61,6 @@ { NSLog(@"EditBeanViewController - initViewController"); - if (self.editMode == YES) - { - //TODO: Update UI to refelect edit mode. - - //+ set UI controls with values from beanCollection. - NSLog(@"EditBeanViewController - in edit state"); - } - else - { - NSLog(@"EditBeanViewController - in add new state"); - } - //Fetch bean data from the collection and populate the ui. Bean *b = [self.beanCollection.beans objectAtIndex:self.editBeanIndex]; if (b != nil) -- cgit v1.2.3