diff options
author | Eddie Ehlin <eddiex@eddiex.se> | 2013-01-14 21:55:03 +0100 |
---|---|---|
committer | Eddie Ehlin <eddiex@eddiex.se> | 2013-01-14 21:55:03 +0100 |
commit | e2eb9397b85b1b6ec8a1b2b170f0d54f33f07f20 (patch) | |
tree | d2f09d1ef2582fe29a6f91c0333fcc8f1f35056e | |
parent | 0f4ee390a7d365e6b6fc8366b06d0f5a9fa58b3e (diff) | |
download | iBean-e2eb9397b85b1b6ec8a1b2b170f0d54f33f07f20.tar.gz iBean-e2eb9397b85b1b6ec8a1b2b170f0d54f33f07f20.zip |
Refactored InstaBean into InstantExtraction which also resulted in a more general core data entity for handling configurations. Config variables related to instant extraction is prefixed with instantExtraction.
-rw-r--r-- | iBean/iBean.xcodeproj/project.pbxproj | 38 | ||||
-rw-r--r-- | iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate | bin | 33497 -> 34948 bytes | |||
-rw-r--r-- | iBean/iBean/.DS_Store | bin | 6148 -> 6148 bytes | |||
-rw-r--r-- | iBean/iBean/AppDelegate+Storage.h | 6 | ||||
-rw-r--r-- | iBean/iBean/AppDelegate+Storage.m | 27 | ||||
-rw-r--r-- | iBean/iBean/Configuration+Interface.h | 13 | ||||
-rw-r--r-- | iBean/iBean/Configuration+Interface.m | 13 | ||||
-rw-r--r-- | iBean/iBean/Configuration.h | 17 | ||||
-rw-r--r-- | iBean/iBean/Configuration.m | 16 | ||||
-rw-r--r-- | iBean/iBean/InstaBeanConfiguration.h | 17 | ||||
-rw-r--r-- | iBean/iBean/InstaBeanConfiguration.m | 16 | ||||
-rw-r--r-- | iBean/iBean/InstantExtractionViewController.h (renamed from iBean/iBean/InstaBeanViewController.h) | 10 | ||||
-rw-r--r-- | iBean/iBean/InstantExtractionViewController.m (renamed from iBean/iBean/InstaBeanViewController.m) | 22 | ||||
-rw-r--r-- | iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents | 6 | ||||
-rw-r--r-- | iBean/iBean/iPhoneStoryboard.storyboard | 8 |
15 files changed, 127 insertions, 82 deletions
diff --git a/iBean/iBean.xcodeproj/project.pbxproj b/iBean/iBean.xcodeproj/project.pbxproj index 68cbbd0..5775776 100644 --- a/iBean/iBean.xcodeproj/project.pbxproj +++ b/iBean/iBean.xcodeproj/project.pbxproj @@ -19,8 +19,6 @@ 020C55B01691014E00D8224C /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 020C55AF1691014E00D8224C /* Default-568h@2x.png */; }; 020C55B31691014E00D8224C /* iBean.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 020C55B11691014E00D8224C /* iBean.xcdatamodeld */; }; 020C55BD169101FB00D8224C /* iPhoneStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 020C55BC169101FB00D8224C /* iPhoneStoryboard.storyboard */; }; - 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 */; }; 020C55FA16983E9900D8224C /* BeanCollectionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C55F916983E9900D8224C /* BeanCollectionListViewController.m */; }; 020C560316989D4500D8224C /* BeanCollectionInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C560216989D4500D8224C /* BeanCollectionInfoViewController.m */; }; @@ -32,6 +30,9 @@ 020C5683169F5FBB00D8224C /* BeanCollection+Interface.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C5682169F5FBB00D8224C /* BeanCollection+Interface.m */; }; 020C568F16A1CE0E00D8224C /* EditBeanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C568E16A1CE0E00D8224C /* EditBeanViewController.m */; }; 020C569316A1E55600D8224C /* ExtractionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C569216A1E55600D8224C /* ExtractionViewController.m */; }; + 020C569916A49C5900D8224C /* Configuration.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C569816A49C5900D8224C /* Configuration.m */; }; + 020C569C16A49C8300D8224C /* Configuration+Interface.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C569B16A49C8300D8224C /* Configuration+Interface.m */; }; + 024F676D16A4A61D004A1201 /* InstantExtractionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 024F676C16A4A61D004A1201 /* InstantExtractionViewController.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -51,10 +52,6 @@ 020C55AF1691014E00D8224C /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; }; 020C55B21691014E00D8224C /* iBean.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = iBean.xcdatamodel; sourceTree = "<group>"; }; 020C55BC169101FB00D8224C /* iPhoneStoryboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = iPhoneStoryboard.storyboard; sourceTree = "<group>"; }; - 020C55C21691059800D8224C /* InstaBeanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstaBeanViewController.h; sourceTree = "<group>"; }; - 020C55C31691059800D8224C /* InstaBeanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstaBeanViewController.m; sourceTree = "<group>"; }; - 020C55C516910EAD00D8224C /* InstaBeanConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstaBeanConfiguration.h; sourceTree = "<group>"; }; - 020C55C616910EAD00D8224C /* InstaBeanConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstaBeanConfiguration.m; sourceTree = "<group>"; }; 020C55C81691100000D8224C /* AppDelegate+Storage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+Storage.h"; sourceTree = "<group>"; }; 020C55C91691100000D8224C /* AppDelegate+Storage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+Storage.m"; sourceTree = "<group>"; }; 020C55F816983E9900D8224C /* BeanCollectionListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BeanCollectionListViewController.h; sourceTree = "<group>"; }; @@ -77,6 +74,12 @@ 020C568E16A1CE0E00D8224C /* EditBeanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditBeanViewController.m; sourceTree = "<group>"; }; 020C569116A1E55600D8224C /* ExtractionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtractionViewController.h; sourceTree = "<group>"; }; 020C569216A1E55600D8224C /* ExtractionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtractionViewController.m; sourceTree = "<group>"; }; + 020C569716A49C5900D8224C /* Configuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Configuration.h; sourceTree = "<group>"; }; + 020C569816A49C5900D8224C /* Configuration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Configuration.m; sourceTree = "<group>"; }; + 020C569A16A49C8300D8224C /* Configuration+Interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Configuration+Interface.h"; sourceTree = "<group>"; }; + 020C569B16A49C8300D8224C /* Configuration+Interface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Configuration+Interface.m"; sourceTree = "<group>"; }; + 024F676B16A4A61D004A1201 /* InstantExtractionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstantExtractionViewController.h; sourceTree = "<group>"; }; + 024F676C16A4A61D004A1201 /* InstantExtractionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstantExtractionViewController.m; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -126,8 +129,9 @@ isa = PBXGroup; children = ( 020C55D31695C2C800D8224C /* iBean */, + 020C55B9169101A300D8224C /* InstantExtraction */, + 020C55DF169792F800D8224C /* Data */, 020C55BB169101CE00D8224C /* Storyboards */, - 020C55B9169101A300D8224C /* InstaBean */, 020C55A81691014E00D8224C /* AppDelegate.h */, 020C55A91691014E00D8224C /* AppDelegate.m */, 020C55B11691014E00D8224C /* iBean.xcdatamodeld */, @@ -152,15 +156,13 @@ name = "Supporting Files"; sourceTree = "<group>"; }; - 020C55B9169101A300D8224C /* InstaBean */ = { + 020C55B9169101A300D8224C /* InstantExtraction */ = { isa = PBXGroup; children = ( - 020C55C516910EAD00D8224C /* InstaBeanConfiguration.h */, - 020C55C616910EAD00D8224C /* InstaBeanConfiguration.m */, - 020C55C21691059800D8224C /* InstaBeanViewController.h */, - 020C55C31691059800D8224C /* InstaBeanViewController.m */, + 024F676B16A4A61D004A1201 /* InstantExtractionViewController.h */, + 024F676C16A4A61D004A1201 /* InstantExtractionViewController.m */, ); - name = InstaBean; + name = InstantExtraction; sourceTree = "<group>"; }; 020C55BB169101CE00D8224C /* Storyboards */ = { @@ -179,7 +181,6 @@ 020C56071698F4DC00D8224C /* Step 2 - BeanCollectionBeanList */, 020C566E169E1ACB00D8224C /* Step 3 - Bean */, 020C569016A1E50200D8224C /* Step 4 - Extraction */, - 020C55DF169792F800D8224C /* Data */, ); name = iBean; sourceTree = "<group>"; @@ -188,6 +189,8 @@ isa = PBXGroup; children = ( 020C5684169F603700D8224C /* Interface */, + 020C569716A49C5900D8224C /* Configuration.h */, + 020C569816A49C5900D8224C /* Configuration.m */, 020C567B169F597300D8224C /* BeanCollection.h */, 020C567C169F597300D8224C /* BeanCollection.m */, 020C5678169F597300D8224C /* Bean.h */, @@ -241,6 +244,8 @@ 020C567F169F5E9900D8224C /* Bean+Interface.m */, 020C5681169F5FBA00D8224C /* BeanCollection+Interface.h */, 020C5682169F5FBB00D8224C /* BeanCollection+Interface.m */, + 020C569A16A49C8300D8224C /* Configuration+Interface.h */, + 020C569B16A49C8300D8224C /* Configuration+Interface.m */, ); name = Interface; sourceTree = "<group>"; @@ -323,8 +328,6 @@ 020C55A61691014E00D8224C /* main.m in Sources */, 020C55AA1691014E00D8224C /* AppDelegate.m in Sources */, 020C55B31691014E00D8224C /* iBean.xcdatamodeld in Sources */, - 020C55C41691059800D8224C /* InstaBeanViewController.m in Sources */, - 020C55C716910EAD00D8224C /* InstaBeanConfiguration.m in Sources */, 020C55CA1691100000D8224C /* AppDelegate+Storage.m in Sources */, 020C55FA16983E9900D8224C /* BeanCollectionListViewController.m in Sources */, 020C560316989D4500D8224C /* BeanCollectionInfoViewController.m in Sources */, @@ -336,6 +339,9 @@ 020C5683169F5FBB00D8224C /* BeanCollection+Interface.m in Sources */, 020C568F16A1CE0E00D8224C /* EditBeanViewController.m in Sources */, 020C569316A1E55600D8224C /* ExtractionViewController.m in Sources */, + 020C569916A49C5900D8224C /* Configuration.m in Sources */, + 020C569C16A49C8300D8224C /* Configuration+Interface.m in Sources */, + 024F676D16A4A61D004A1201 /* InstantExtractionViewController.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 Binary files differindex ca0e38e..59502e2 100644 --- a/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate +++ b/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate diff --git a/iBean/iBean/.DS_Store b/iBean/iBean/.DS_Store Binary files differindex 3be0f60..9578c17 100644 --- a/iBean/iBean/.DS_Store +++ b/iBean/iBean/.DS_Store diff --git a/iBean/iBean/AppDelegate+Storage.h b/iBean/iBean/AppDelegate+Storage.h index e56b8bf..bec63e0 100644 --- a/iBean/iBean/AppDelegate+Storage.h +++ b/iBean/iBean/AppDelegate+Storage.h @@ -7,7 +7,7 @@ // #import "AppDelegate.h" -@class InstaBeanConfiguration; +@class Configuration; @class BeanCollection; @class Bean; @@ -24,8 +24,8 @@ - (void) rollback; -#pragma mark - InstaBean related storage methods -- (InstaBeanConfiguration*) getInstaBeanConfiguration; +#pragma mark - iBean configuration related methods +- (Configuration*) getConfiguration; #pragma mark - iBean related storage methods diff --git a/iBean/iBean/AppDelegate+Storage.m b/iBean/iBean/AppDelegate+Storage.m index f678397..5668bd5 100644 --- a/iBean/iBean/AppDelegate+Storage.m +++ b/iBean/iBean/AppDelegate+Storage.m @@ -7,7 +7,7 @@ // #import "AppDelegate+Storage.h" -#import "InstaBeanConfiguration.h" +#import "Configuration+Interface.h" #import "BeanCollection.h" @implementation AppDelegate (Storage) @@ -41,13 +41,13 @@ } #pragma mark - InstaBean related storage methods -- (InstaBeanConfiguration*) getInstaBeanConfiguration +- (Configuration*) getConfiguration { - InstaBeanConfiguration* config = nil; + Configuration* config = nil; if (self.managedObjectContext) { //Note: There should only be ONE entity of this type. - NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"InstaBeanConfiguration"]; + NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"Configuration"]; [fetchRequest setFetchLimit:1]; NSError *fetchRequestError = nil; @@ -55,7 +55,7 @@ if (fetchRequestResult == nil || fetchRequestError != nil) { - NSLog(@"getInstaBeanConfiguration - Fetch request resulted in an error!"); + NSLog(@"getConfiguration - Fetch request resulted in an error!"); UIAlertView *loadErrorAlert = [[UIAlertView alloc] initWithTitle:@"Load error!" @@ -65,8 +65,21 @@ } else if (fetchRequestResult.count == 0) { - config = [NSEntityDescription insertNewObjectForEntityForName:@"InstaBeanConfiguration" inManagedObjectContext:self.managedObjectContext]; - config.extractionTime = [NSNumber numberWithDouble:25.0f]; + config = [NSEntityDescription insertNewObjectForEntityForName:@"Configuration" inManagedObjectContext:self.managedObjectContext]; + if (config != nil) + { + //Set default configuration values: + config.instantExtractionTime = [NSNumber numberWithDouble:25.0f]; + } + else + { + UIAlertView *createConfigurationAlert = [[UIAlertView alloc] + initWithTitle:@"Create config error!" + message:@"iBean unable to create configuration object.\n(Please check memory available.)" + delegate:nil + cancelButtonTitle:@"OK" otherButtonTitles: nil]; + [createConfigurationAlert show]; + } } else { diff --git a/iBean/iBean/Configuration+Interface.h b/iBean/iBean/Configuration+Interface.h new file mode 100644 index 0000000..d2660b7 --- /dev/null +++ b/iBean/iBean/Configuration+Interface.h @@ -0,0 +1,13 @@ +// +// Configuration+Interface.h +// iBean +// +// Created by Eddie Ehlin on 2013-01-14. +// Copyright (c) 2013 Eddie Ehlin. All rights reserved. +// + +#import "Configuration.h" + +@interface Configuration (Interface) + +@end diff --git a/iBean/iBean/Configuration+Interface.m b/iBean/iBean/Configuration+Interface.m new file mode 100644 index 0000000..549997e --- /dev/null +++ b/iBean/iBean/Configuration+Interface.m @@ -0,0 +1,13 @@ +// +// Configuration+Interface.m +// iBean +// +// Created by Eddie Ehlin on 2013-01-14. +// Copyright (c) 2013 Eddie Ehlin. All rights reserved. +// + +#import "Configuration+Interface.h" + +@implementation Configuration (Interface) + +@end diff --git a/iBean/iBean/Configuration.h b/iBean/iBean/Configuration.h new file mode 100644 index 0000000..bb7b24c --- /dev/null +++ b/iBean/iBean/Configuration.h @@ -0,0 +1,17 @@ +// +// Configuration.h +// iBean +// +// Created by Eddie Ehlin on 2013-01-14. +// Copyright (c) 2013 Eddie Ehlin. All rights reserved. +// + +#import <Foundation/Foundation.h> +#import <CoreData/CoreData.h> + + +@interface Configuration : NSManagedObject + +@property (nonatomic, retain) NSNumber * instantExtractionTime; + +@end diff --git a/iBean/iBean/Configuration.m b/iBean/iBean/Configuration.m new file mode 100644 index 0000000..6fde89e --- /dev/null +++ b/iBean/iBean/Configuration.m @@ -0,0 +1,16 @@ +// +// Configuration.m +// iBean +// +// Created by Eddie Ehlin on 2013-01-14. +// Copyright (c) 2013 Eddie Ehlin. All rights reserved. +// + +#import "Configuration.h" + + +@implementation Configuration + +@dynamic instantExtractionTime; + +@end diff --git a/iBean/iBean/InstaBeanConfiguration.h b/iBean/iBean/InstaBeanConfiguration.h deleted file mode 100644 index ca985a7..0000000 --- a/iBean/iBean/InstaBeanConfiguration.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// InstaBeanConfiguration.h -// iBean -// -// Created by Eddie Ehlin on 2012-12-31. -// Copyright (c) 2012 Eddie Ehlin. All rights reserved. -// - -#import <Foundation/Foundation.h> -#import <CoreData/CoreData.h> - - -@interface InstaBeanConfiguration : NSManagedObject - -@property (nonatomic, retain) NSNumber * extractionTime; - -@end diff --git a/iBean/iBean/InstaBeanConfiguration.m b/iBean/iBean/InstaBeanConfiguration.m deleted file mode 100644 index c80cc72..0000000 --- a/iBean/iBean/InstaBeanConfiguration.m +++ /dev/null @@ -1,16 +0,0 @@ -// -// InstaBeanConfiguration.m -// iBean -// -// Created by Eddie Ehlin on 2012-12-31. -// Copyright (c) 2012 Eddie Ehlin. All rights reserved. -// - -#import "InstaBeanConfiguration.h" - - -@implementation InstaBeanConfiguration - -@dynamic extractionTime; - -@end diff --git a/iBean/iBean/InstaBeanViewController.h b/iBean/iBean/InstantExtractionViewController.h index f21c3bf..e8ec739 100644 --- a/iBean/iBean/InstaBeanViewController.h +++ b/iBean/iBean/InstantExtractionViewController.h @@ -1,5 +1,5 @@ // -// InstaBeanViewController.h +// InstantExtractionViewController.h // iBean // // Created by Eddie Ehlin on 2012-12-31. @@ -7,16 +7,16 @@ // #import <UIKit/UIKit.h> -#import "InstaBeanConfiguration.h" +#import "Configuration+Interface.h" -@interface InstaBeanViewController : UIViewController +@interface InstantExtractionViewController : UIViewController @property (nonatomic, assign) double extractionProgress; @property (nonatomic, strong) NSTimer* timer; -@property (nonatomic, strong) InstaBeanConfiguration *configuration; +@property (nonatomic, strong) Configuration *configuration; /* Utility methods */ -- (void) initInstaBean; +- (void) initViewController; - (void) updateExtractionSettingLabel; - (void) updateExtractionProgressLabel; - (void) haltExtractionTimer; diff --git a/iBean/iBean/InstaBeanViewController.m b/iBean/iBean/InstantExtractionViewController.m index 5d3d566..699d2c8 100644 --- a/iBean/iBean/InstaBeanViewController.m +++ b/iBean/iBean/InstantExtractionViewController.m @@ -1,19 +1,19 @@ // -// InstaBeanViewController.m +// InstantExtractionViewController.m // iBean // // Created by Eddie Ehlin on 2012-12-31. // Copyright (c) 2012 Eddie Ehlin. All rights reserved. // -#import "InstaBeanViewController.h" +#import "InstantExtractionViewController.h" #import "AppDelegate+Storage.h" -@interface InstaBeanViewController () +@interface InstantExtractionViewController () @end -@implementation InstaBeanViewController +@implementation InstantExtractionViewController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil @@ -34,7 +34,7 @@ - (void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - [self initInstaBean]; + [self initViewController]; } - (void)didReceiveMemoryWarning @@ -48,21 +48,21 @@ Utility methods *****************************************************/ #pragma mark - Utility methods -- (void) initInstaBean +- (void) initViewController { if (self.configuration == nil) { NSLog(@"Loading & setting stepper!"); - self.configuration = [(AppDelegate*) [[UIApplication sharedApplication] delegate] getInstaBeanConfiguration]; + self.configuration = [(AppDelegate*) [[UIApplication sharedApplication] delegate] getConfiguration]; if (self.configuration == nil) { - NSLog(@"initInstaBean received nil for configuration!"); + NSLog(@"InstantExtractionViewController - initViewController: received nil for configuration!"); return; } } - [self.extractionSettingStepper setValue:[self.configuration.extractionTime doubleValue]]; + [self.extractionSettingStepper setValue:[self.configuration.instantExtractionTime doubleValue]]; [self updateExtractionSettingLabel]; } @@ -122,13 +122,13 @@ if (self.configuration != nil) { - self.configuration.extractionTime = [NSNumber numberWithDouble:self.extractionSettingStepper.value]; + self.configuration.instantExtractionTime = [NSNumber numberWithDouble:self.extractionSettingStepper.value]; //Let's save our config. NSError* error = [(AppDelegate*) [[UIApplication sharedApplication] delegate] save]; if (error != nil) { - NSLog(@"InstaBean unable to save configuration!"); + NSLog(@"InstantExtraction unable to save configuration!"); UIAlertView *saveErrorAlert = [[UIAlertView alloc] initWithTitle:@"Save error!" message:@"Unable to save configuration." diff --git a/iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents b/iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents index f7f7901..98664e2 100644 --- a/iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents +++ b/iBean/iBean/iBean.xcdatamodeld/iBean.xcdatamodel/contents @@ -15,12 +15,12 @@ <attribute name="note" optional="YES" attributeType="String" syncable="YES"/> <relationship name="beans" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="Bean" inverseName="beanCollection" inverseEntity="Bean" syncable="YES"/> </entity> - <entity name="InstaBeanConfiguration" representedClassName="InstaBeanConfiguration" syncable="YES"> - <attribute name="extractionTime" optional="YES" attributeType="Double" defaultValueString="0.0" syncable="YES"/> + <entity name="Configuration" representedClassName="Configuration" syncable="YES"> + <attribute name="instantExtractionTime" optional="YES" attributeType="Double" defaultValueString="0.0" syncable="YES"/> </entity> <elements> <element name="Bean" positionX="-369" positionY="111" width="128" height="105"/> <element name="BeanCollection" positionX="160" positionY="192" width="128" height="150"/> - <element name="InstaBeanConfiguration" positionX="160" positionY="192" width="128" height="60"/> + <element name="Configuration" positionX="160" positionY="192" width="128" height="60"/> </elements> </model>
\ No newline at end of file diff --git a/iBean/iBean/iPhoneStoryboard.storyboard b/iBean/iBean/iPhoneStoryboard.storyboard index 752dcfa..358e404 100644 --- a/iBean/iBean/iPhoneStoryboard.storyboard +++ b/iBean/iBean/iPhoneStoryboard.storyboard @@ -56,10 +56,10 @@ </objects> <point key="canvasLocation" x="1285" y="403"/> </scene> - <!--Insta Bean View Controller - Insta bean--> + <!--Instant Extraction View Controller - Insta bean--> <scene sceneID="Lvr-w4-t8a"> <objects> - <viewController id="b3D-qj-cdZ" customClass="InstaBeanViewController" sceneMemberID="viewController"> + <viewController id="b3D-qj-cdZ" customClass="InstantExtractionViewController" sceneMemberID="viewController"> <view key="view" contentMode="scaleToFill" id="NBj-4q-93f"> <rect key="frame" x="0.0" y="20" width="320" height="499"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> @@ -696,8 +696,8 @@ <relationship kind="outlet" name="extractionSettingStepper" candidateClass="UIStepper"/> </relationships> </class> - <class className="InstaBeanViewController" superclassName="UIViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/InstaBeanViewController.h"/> + <class className="InstantExtractionViewController" superclassName="UIViewController"> + <source key="sourceIdentifier" type="project" relativePath="./Classes/InstantExtractionViewController.h"/> <relationships> <relationship kind="action" name="setExtractionTimer:"/> <relationship kind="action" name="startExtraction:"/> |