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.xcuserstatebin43341 -> 43024 bytes
-rw-r--r--iBean/iBean/SettingsViewController.h1
-rw-r--r--iBean/iBean/SettingsViewController.m24
-rw-r--r--iBean/iBean/iPhoneStoryboard.storyboard39
4 files changed, 53 insertions, 11 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 bd3354c..c87b20a 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/SettingsViewController.h b/iBean/iBean/SettingsViewController.h
index 86b14bd..bfee4f8 100644
--- a/iBean/iBean/SettingsViewController.h
+++ b/iBean/iBean/SettingsViewController.h
@@ -26,5 +26,6 @@
- (IBAction)countExtractionsSwitchChanged:(id)sender;
- (IBAction)useThresholdsSwitchChanged:(id)sender;
- (IBAction)extractionCountStepperChanged:(id)sender;
+- (IBAction)resetExtractionCount:(id)sender;
@end
diff --git a/iBean/iBean/SettingsViewController.m b/iBean/iBean/SettingsViewController.m
index 4b8f723..7290f6d 100644
--- a/iBean/iBean/SettingsViewController.m
+++ b/iBean/iBean/SettingsViewController.m
@@ -145,6 +145,30 @@
}
}
+- (void) resetExtractionCount:(id)sender
+{
+ if (self.configuration != nil)
+ {
+ NSError *error = [(AppDelegate*) [[UIApplication sharedApplication] delegate] setExtractionCount:[NSNumber numberWithInt:0]];
+ self.extractionCountLabel.text = [self.configuration.extractionCount stringValue];
+ self.extractionCountStepper.value = [self.configuration.extractionCount doubleValue];
+ if (error != nil)
+ {
+ UIAlertView *setExtractionCountAlert = [[UIAlertView alloc]
+ initWithTitle:@"Configuration error!"
+ message:@"iBean was not able to save configuration attribute for \"Extraction count\"."
+ delegate:nil
+ cancelButtonTitle:@"OK" otherButtonTitles: nil];
+ [setExtractionCountAlert show];
+ }
+ else
+ {
+ self.extractionCountLabel.text = [self.configuration.extractionCount stringValue];
+ self.extractionCountStepper.value = [self.configuration.extractionCount doubleValue];
+ }
+ }
+}
+
/*****************************************************
Delegates
*****************************************************/
diff --git a/iBean/iBean/iPhoneStoryboard.storyboard b/iBean/iBean/iPhoneStoryboard.storyboard
index cec0cd1..0244142 100644
--- a/iBean/iBean/iPhoneStoryboard.storyboard
+++ b/iBean/iBean/iPhoneStoryboard.storyboard
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2844" systemVersion="12C60" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="C1o-is-nML">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12C60" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="C1o-is-nML">
<dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1930"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
</dependencies>
<scenes>
<!--Bean Collection List View Controller - iBean-->
@@ -225,11 +225,11 @@
</tableViewSection>
<tableViewSection headerTitle="iBean Data" id="FnM-qR-V8p">
<cells>
- <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="r9O-D5-k1M">
- <rect key="frame" x="0.0" y="182" width="320" height="45"/>
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="115" id="r9O-D5-k1M">
+ <rect key="frame" x="0.0" y="182" width="320" height="116"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
- <rect key="frame" x="10" y="1" width="300" height="43"/>
+ <rect key="frame" x="10" y="1" width="300" height="114"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Extractions" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="km0-m9-Uso">
@@ -253,21 +253,37 @@
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QkD-Ej-5zA">
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" title="Reset extraction count">
+ <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="resetExtractionCount:" destination="kQZ-wX-3ix" eventType="touchUpInside" id="uTE-de-elE"/>
+ </connections>
+ </button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<constraints>
- <constraint firstItem="ijG-QW-wOy" firstAttribute="centerY" secondItem="r9O-D5-k1M" secondAttribute="centerY" type="default" id="3jk-3j-3a9"/>
- <constraint firstItem="km0-m9-Uso" firstAttribute="leading" secondItem="r9O-D5-k1M" secondAttribute="leading" constant="30" id="9sz-z3-MKW"/>
+ <constraint firstItem="QkD-Ej-5zA" firstAttribute="trailing" secondItem="ijG-QW-wOy" secondAttribute="trailing" type="default" id="Cn3-ak-NQ6"/>
+ <constraint firstItem="ijG-QW-wOy" firstAttribute="top" secondItem="km0-m9-Uso" secondAttribute="top" type="default" id="FvK-L8-AUE"/>
+ <constraint firstItem="TgN-Et-A27" firstAttribute="top" secondItem="r9O-D5-k1M" secondAttribute="top" constant="32" id="GK0-2X-6qm"/>
<constraint firstItem="ijG-QW-wOy" firstAttribute="leading" secondItem="km0-m9-Uso" secondAttribute="trailing" constant="8" symbolic="YES" type="default" id="I94-NM-CIv"/>
+ <constraint firstItem="QkD-Ej-5zA" firstAttribute="centerX" secondItem="r9O-D5-k1M" secondAttribute="centerX" type="default" id="N9U-lc-pW0"/>
+ <constraint firstItem="km0-m9-Uso" firstAttribute="top" secondItem="r9O-D5-k1M" secondAttribute="top" constant="9" id="PtS-dk-paa"/>
+ <constraint firstItem="QkD-Ej-5zA" firstAttribute="leading" secondItem="TgN-Et-A27" secondAttribute="leading" type="default" id="YRE-yw-ajh"/>
+ <constraint firstItem="QkD-Ej-5zA" firstAttribute="top" secondItem="TgN-Et-A27" secondAttribute="bottom" constant="8" symbolic="YES" type="default" id="ewn-fs-z6G"/>
<constraint firstItem="TgN-Et-A27" firstAttribute="leading" secondItem="km0-m9-Uso" secondAttribute="leading" type="default" id="hNw-MA-UTa"/>
- <constraint firstItem="TgN-Et-A27" firstAttribute="top" secondItem="r9O-D5-k1M" secondAttribute="top" constant="21" id="hdj-jU-Lce"/>
- <constraint firstItem="km0-m9-Uso" firstAttribute="top" secondItem="r9O-D5-k1M" secondAttribute="top" constant="3" id="nIo-yb-Feb"/>
<constraint firstItem="ijG-QW-wOy" firstAttribute="leading" secondItem="TgN-Et-A27" secondAttribute="trailing" constant="8" symbolic="YES" type="default" id="pYL-cX-chv"/>
</constraints>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="noJ-aA-kKf">
- <rect key="frame" x="0.0" y="227" width="320" height="45"/>
+ <rect key="frame" x="0.0" y="298" width="320" height="45"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="280" height="43"/>
@@ -1039,7 +1055,7 @@
</constraints>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" reuseIdentifier="BeanCell" rowHeight="60" id="GFY-k6-GqL" customClass="BeanCell">
- <rect key="frame" x="0.0" y="46" width="320" height="62"/>
+ <rect key="frame" x="0.0" y="46" width="320" height="61"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="1" width="300" height="59"/>
@@ -1303,6 +1319,7 @@
<relationships>
<relationship kind="action" name="countExtractionsSwitchChanged:"/>
<relationship kind="action" name="extractionCountStepperChanged:"/>
+ <relationship kind="action" name="resetExtractionCount:"/>
<relationship kind="action" name="useThresholdsSwitchChanged:"/>
<relationship kind="outlet" name="countExtractionsSwitch" candidateClass="UISwitch"/>
<relationship kind="outlet" name="extractionCountLabel" candidateClass="UILabel"/>