aboutsummaryrefslogtreecommitdiffstats
path: root/iBean
diff options
context:
space:
mode:
Diffstat (limited to 'iBean')
-rw-r--r--iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstatebin33713 -> 32990 bytes
-rw-r--r--iBean/iBean/AddBeanViewController.m12
-rw-r--r--iBean/iBean/iPhoneStoryboard.storyboard4
3 files changed, 14 insertions, 2 deletions
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 d0691ef..9208585 100644
--- a/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate
+++ b/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/iBean/iBean/AddBeanViewController.m b/iBean/iBean/AddBeanViewController.m
index be5cc8e..553bc93 100644
--- a/iBean/iBean/AddBeanViewController.m
+++ b/iBean/iBean/AddBeanViewController.m
@@ -51,6 +51,18 @@
{
NSLog(@"AddBeanViewController - initViewController");
+ //If there exists beans in collection, then pre set the
+ //grinder setting to the value of latest added bean.
+ if (self.beanCollection != nil)
+ {
+ if (self.beanCollection.beans.count > 0)
+ {
+ NSNumber *grinderSetting = ((Bean*)[self.beanCollection.beans lastObject]).grindSetting;
+ self.grinderSettingLabel.text = [NSString stringWithFormat:@"%1.0f", [grinderSetting doubleValue]];
+ self.grinderSettingStepper.value = [grinderSetting doubleValue];
+ }
+ }
+
if (self.editMode == YES)
{
//TODO: Update UI to refelect edit mode.
diff --git a/iBean/iBean/iPhoneStoryboard.storyboard b/iBean/iBean/iPhoneStoryboard.storyboard
index 03f46e5..153d02f 100644
--- a/iBean/iBean/iPhoneStoryboard.storyboard
+++ b/iBean/iBean/iPhoneStoryboard.storyboard
@@ -392,7 +392,7 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="0.0" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nPM-k1-zYG">
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="0" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nPM-k1-zYG">
<constraints>
<constraint firstAttribute="width" constant="29" id="qX5-Yz-NSx"/>
</constraints>
@@ -548,7 +548,7 @@
<action selector="grinderSettingStepperChanged:" destination="YXO-0S-PzZ" eventType="valueChanged" id="f0Q-WO-wvI"/>
</connections>
</stepper>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="0.0" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hHL-o2-clY">
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="0" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hHL-o2-clY">
<constraints>
<constraint firstAttribute="width" constant="29" id="7IX-JY-Sim"/>
</constraints>