diff options
Diffstat (limited to 'iBean')
-rw-r--r-- | iBean/iBean.xcodeproj/project.pbxproj | 10 | ||||
-rw-r--r-- | iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate | bin | 66883 -> 50262 bytes | |||
-rw-r--r-- | iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist | 13 | ||||
-rw-r--r-- | iBean/iBean/BeanCell.m | 2 | ||||
-rw-r--r-- | iBean/iBean/BeanCollectionExtractionScrollView.m | 4 | ||||
-rw-r--r-- | iBean/iBean/BeanCollectionExtractionViewController.m | 14 | ||||
-rw-r--r-- | iBean/iBean/UITableView+Extra.h | 15 | ||||
-rw-r--r-- | iBean/iBean/UITableView+Extra.m | 36 | ||||
-rw-r--r-- | iBean/iBean/iPhoneStoryboard.storyboard | 14 |
9 files changed, 96 insertions, 12 deletions
diff --git a/iBean/iBean.xcodeproj/project.pbxproj b/iBean/iBean.xcodeproj/project.pbxproj index 64c42d5..72a51e6 100644 --- a/iBean/iBean.xcodeproj/project.pbxproj +++ b/iBean/iBean.xcodeproj/project.pbxproj @@ -33,6 +33,8 @@ 020C569C16A49C8300D8224C /* Configuration+Interface.m in Sources */ = {isa = PBXBuildFile; fileRef = 020C569B16A49C8300D8224C /* Configuration+Interface.m */; }; 022A9C6B16BE9CA300DB3A4A /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 022A9C6A16BE9CA300DB3A4A /* AudioToolbox.framework */; }; 024CB02016C04BD5009CBC15 /* UIColor+Extra.m in Sources */ = {isa = PBXBuildFile; fileRef = 024CB01F16C04BD5009CBC15 /* UIColor+Extra.m */; }; + 024CB03716C2EF10009CBC15 /* UITableView+Extra.m in Sources */ = {isa = PBXBuildFile; fileRef = 024CB03616C2EF10009CBC15 /* UITableView+Extra.m */; }; + 024CB03916C2EFD5009CBC15 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 024CB03816C2EFD5009CBC15 /* QuartzCore.framework */; }; 024F676D16A4A61D004A1201 /* InstantExtractionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 024F676C16A4A61D004A1201 /* InstantExtractionViewController.m */; }; 0276253916B58D6000EE2F4E /* SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0276253816B58D6000EE2F4E /* SettingsViewController.m */; }; 0276253C16B59E4C00EE2F4E /* Configuration.m in Sources */ = {isa = PBXBuildFile; fileRef = 0276253B16B59E4C00EE2F4E /* Configuration.m */; }; @@ -89,6 +91,9 @@ 022A9C6A16BE9CA300DB3A4A /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 024CB01E16C04BD5009CBC15 /* UIColor+Extra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+Extra.h"; sourceTree = "<group>"; }; 024CB01F16C04BD5009CBC15 /* UIColor+Extra.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+Extra.m"; sourceTree = "<group>"; }; + 024CB03516C2EF10009CBC15 /* UITableView+Extra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITableView+Extra.h"; sourceTree = "<group>"; }; + 024CB03616C2EF10009CBC15 /* UITableView+Extra.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+Extra.m"; sourceTree = "<group>"; }; + 024CB03816C2EFD5009CBC15 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 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>"; }; 0276253716B58D6000EE2F4E /* SettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsViewController.h; sourceTree = "<group>"; }; @@ -116,6 +121,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 024CB03916C2EFD5009CBC15 /* QuartzCore.framework in Frameworks */, 022A9C6B16BE9CA300DB3A4A /* AudioToolbox.framework in Frameworks */, 020C55981691014E00D8224C /* UIKit.framework in Frameworks */, 020C559A1691014E00D8224C /* Foundation.framework in Frameworks */, @@ -147,6 +153,7 @@ 020C55961691014E00D8224C /* Frameworks */ = { isa = PBXGroup; children = ( + 024CB03816C2EFD5009CBC15 /* QuartzCore.framework */, 022A9C6A16BE9CA300DB3A4A /* AudioToolbox.framework */, 020C55971691014E00D8224C /* UIKit.framework */, 020C55991691014E00D8224C /* Foundation.framework */, @@ -301,6 +308,8 @@ children = ( 024CB01E16C04BD5009CBC15 /* UIColor+Extra.h */, 024CB01F16C04BD5009CBC15 /* UIColor+Extra.m */, + 024CB03516C2EF10009CBC15 /* UITableView+Extra.h */, + 024CB03616C2EF10009CBC15 /* UITableView+Extra.m */, ); name = Categories; sourceTree = "<group>"; @@ -432,6 +441,7 @@ 0276254516B5AACF00EE2F4E /* ThresholdViewController.m in Sources */, 0276254816B5BC5300EE2F4E /* ThresholdCell.m in Sources */, 024CB02016C04BD5009CBC15 /* UIColor+Extra.m in Sources */, + 024CB03716C2EF10009CBC15 /* UITableView+Extra.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 5e4e5cb..c07ccef 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.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist index 6e8321f..eb98d15 100644 --- a/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist +++ b/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist @@ -133,5 +133,18 @@ landmarkName = "-processThresholds" landmarkType = "5"> </FileBreakpoint> + <FileBreakpoint + shouldBeEnabled = "No" + ignoreCount = "0" + continueAfterRunningActions = "No" + filePath = "iBean/UITableView+Extra.m" + timestampString = "381876390.256284" + startingColumnNumber = "9223372036854775807" + endingColumnNumber = "9223372036854775807" + startingLineNumber = "18" + endingLineNumber = "18" + landmarkName = "+bottomShadowToTableView:" + landmarkType = "5"> + </FileBreakpoint> </FileBreakpoints> </Bucket> diff --git a/iBean/iBean/BeanCell.m b/iBean/iBean/BeanCell.m index cc5f663..0cc2f0e 100644 --- a/iBean/iBean/BeanCell.m +++ b/iBean/iBean/BeanCell.m @@ -29,7 +29,7 @@ - (void) initWithNameGrindSettingAndAmount: (NSString*) name: (NSNumber*)grindSetting: (NSNumber*) amount { self.beanNameLabel.text = name; - self.beanGrindSettingLabel.text = [NSString stringWithFormat:@"%@", grindSetting]; + self.beanGrindSettingLabel.text = [NSString stringWithFormat:@"Grind @ %@", grindSetting]; self.beanAmountLabel.text = [NSString stringWithFormat:@"%1.1f g", [amount doubleValue]]; } diff --git a/iBean/iBean/BeanCollectionExtractionScrollView.m b/iBean/iBean/BeanCollectionExtractionScrollView.m index 5a7b024..682f525 100644 --- a/iBean/iBean/BeanCollectionExtractionScrollView.m +++ b/iBean/iBean/BeanCollectionExtractionScrollView.m @@ -26,9 +26,9 @@ //Resize the UITableView containing all the beans UITableView *bt = [self.subviews objectAtIndex:0]; //1 - Set the height of the table cells - [bt setRowHeight:60.0f]; + [bt setRowHeight:60.0f]; //2 - Calculate the total height for the tableview (i.e.: numberOfRows*rowHeight) - bt.frame = CGRectMake(bt.frame.origin.x, bt.frame.origin.y, bt.frame.size.width, [bt numberOfRowsInSection:0]*bt.rowHeight); + bt.frame = CGRectMake(bt.frame.origin.x, bt.frame.origin.y, bt.frame.size.width, ([bt numberOfRowsInSection:0]*bt.rowHeight)+bt.tableFooterView.bounds.size.height); //Move down the note text view, so that it don't overlaps the table. UITextView *note = [self.subviews objectAtIndex:1]; diff --git a/iBean/iBean/BeanCollectionExtractionViewController.m b/iBean/iBean/BeanCollectionExtractionViewController.m index 633c44a..7ac982f 100644 --- a/iBean/iBean/BeanCollectionExtractionViewController.m +++ b/iBean/iBean/BeanCollectionExtractionViewController.m @@ -5,7 +5,6 @@ // Created by Eddie Ehlin on 2013-01-18. // Copyright (c) 2013 Eddie Ehlin. All rights reserved. // - #import <AudioToolbox/AudioToolbox.h> #import "BeanCollectionExtractionViewController.h" #import "BeanCollectionInfoViewController.h" @@ -13,6 +12,7 @@ #import "BeanCell.h" #import "Bean+Interface.h" #import "AppDelegate+Storage.h" +#import "UITableView+Extra.h" @interface BeanCollectionExtractionViewController () @@ -33,7 +33,7 @@ { [super viewDidLoad]; // Do any additional setup after loading the view. - + //[self.beanCollectionNoteTextView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed: @"textview-bg.png"]]]; } - (void) viewWillDisappear:(BOOL)animated @@ -187,6 +187,16 @@ return cell; } +- (UIView*) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section +{ + //Add shadow to the bottom of the bean table view. + return [UITableView bottomShadowForTableView:self.beanTableView]; +} + +-(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{ + return 10.0f; +} + #pragma mark - UIAlertView delegate - (void) alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { diff --git a/iBean/iBean/UITableView+Extra.h b/iBean/iBean/UITableView+Extra.h new file mode 100644 index 0000000..2eb8bc3 --- /dev/null +++ b/iBean/iBean/UITableView+Extra.h @@ -0,0 +1,15 @@ +// +// UITableView+Extra.h +// iBean +// +// Created by Eddie Ehlin on 2013-02-06. +// Copyright (c) 2013 Eddie Ehlin. All rights reserved. +// + +#import <UIKit/UIKit.h> + +@interface UITableView (Extra) + ++ (UIView*)bottomShadowForTableView:(UITableView*) tableView; + +@end diff --git a/iBean/iBean/UITableView+Extra.m b/iBean/iBean/UITableView+Extra.m new file mode 100644 index 0000000..54195ac --- /dev/null +++ b/iBean/iBean/UITableView+Extra.m @@ -0,0 +1,36 @@ +// +// UITableView+Extra.m +// iBean +// +// Created by Eddie Ehlin on 2013-02-06. +// Copyright (c) 2013 Eddie Ehlin. All rights reserved. +// + +#import "UITableView+Extra.h" +#import <QuartzCore/CoreAnimation.h> + +@implementation UITableView (Extra) + ++ (UIView*) bottomShadowForTableView:(UITableView *)tableView +{ + UIView *shadowView = nil; + + if (tableView != nil) + { + UIColor *blackColor = [[UIColor blackColor] colorWithAlphaComponent:0.6f]; + UIColor *lightColor = [UIColor clearColor]; + NSInteger shadowHeight = 10; + + shadowView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, shadowHeight)]; + shadowView.alpha = 0.6f; + + CAGradientLayer *shadowGradient = [[CAGradientLayer alloc] init]; + shadowGradient.frame = CGRectMake(0,0, tableView.frame.size.width, shadowHeight); + shadowGradient.colors = [NSArray arrayWithObjects:(id)[blackColor CGColor], (id)[lightColor CGColor], nil]; + + [shadowView.layer addSublayer:shadowGradient]; + } + return shadowView; +} + +@end diff --git a/iBean/iBean/iPhoneStoryboard.storyboard b/iBean/iBean/iPhoneStoryboard.storyboard index a4b3309..18bb04e 100644 --- a/iBean/iBean/iPhoneStoryboard.storyboard +++ b/iBean/iBean/iPhoneStoryboard.storyboard @@ -1065,6 +1065,7 @@ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> <constraint firstAttribute="height" constant="89" id="ulf-w1-iKE"/> + <constraint firstAttribute="width" constant="320" id="vRm-5F-Wp0"/> </constraints> <prototypes> <tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" reuseIdentifier="BeanCell" rowHeight="60" id="GFY-k6-GqL" customClass="BeanCell"> @@ -1140,23 +1141,23 @@ <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WyC-9J-FOJ"> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> <constraints> - <constraint firstAttribute="width" constant="280" id="0dh-2u-5Ao"/> - <constraint firstAttribute="height" constant="194" id="hpC-9a-g7Y"/> + <constraint firstAttribute="height" constant="278" id="fys-4g-fjL"/> </constraints> <string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string> <fontDescription key="fontDescription" type="system" pointSize="14"/> <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> </textView> </subviews> - <color key="backgroundColor" red="0.1960784314" green="0.30980392159999998" blue="0.52156862749999999" alpha="1" colorSpace="calibratedRGB"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> <constraint firstItem="nNM-14-LcQ" firstAttribute="leading" secondItem="lWi-pD-I1j" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="Fjx-gD-Ph5"/> <constraint firstItem="nNM-14-LcQ" firstAttribute="top" secondItem="lWi-pD-I1j" secondAttribute="top" constant="20" symbolic="YES" type="default" id="FtY-Zh-q0q"/> - <constraint firstItem="WyC-9J-FOJ" firstAttribute="centerX" secondItem="lWi-pD-I1j" secondAttribute="centerX" type="default" id="LYg-dX-YRT"/> - <constraint firstItem="WyC-9J-FOJ" firstAttribute="centerX" secondItem="nNM-14-LcQ" secondAttribute="centerX" type="default" id="UBK-TG-UP6"/> + <constraint firstItem="WyC-9J-FOJ" firstAttribute="leading" secondItem="lWi-pD-I1j" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="Lb4-0U-ujx"/> + <constraint firstItem="WyC-9J-FOJ" firstAttribute="centerX" secondItem="lWi-pD-I1j" secondAttribute="centerX" type="default" id="M8q-m1-I5x"/> + <constraint firstAttribute="bottom" secondItem="WyC-9J-FOJ" secondAttribute="bottom" constant="20" symbolic="YES" type="default" id="ZJd-94-CmJ"/> + <constraint firstAttribute="trailing" secondItem="WyC-9J-FOJ" secondAttribute="trailing" constant="20" symbolic="YES" type="default" id="bjg-lY-kza"/> <constraint firstItem="WyC-9J-FOJ" firstAttribute="top" secondItem="nNM-14-LcQ" secondAttribute="bottom" constant="8" symbolic="YES" type="default" id="fPM-8S-dGh"/> <constraint firstAttribute="trailing" secondItem="nNM-14-LcQ" secondAttribute="trailing" constant="20" symbolic="YES" type="default" id="ffc-G9-gKf"/> - <constraint firstAttribute="bottom" secondItem="WyC-9J-FOJ" secondAttribute="bottom" constant="104" id="jDu-bz-Akj"/> </constraints> </scrollView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YJ7-1f-6ZW"> @@ -1179,7 +1180,6 @@ <constraints> <constraint firstItem="lWi-pD-I1j" firstAttribute="top" secondItem="Wfz-bK-fv9" secondAttribute="top" constant="-20" id="23s-Qj-OI3"/> <constraint firstAttribute="bottom" secondItem="OLN-e5-oOe" secondAttribute="bottom" constant="20" symbolic="YES" type="default" id="5Qr-Sh-PDH"/> - <constraint firstItem="lWi-pD-I1j" firstAttribute="leading" secondItem="Wfz-bK-fv9" secondAttribute="leading" constant="-20" id="GCr-R6-byk"/> <constraint firstItem="lWi-pD-I1j" firstAttribute="centerX" secondItem="Wfz-bK-fv9" secondAttribute="centerX" type="default" id="TpB-6n-I3J"/> <constraint firstAttribute="trailing" secondItem="YJ7-1f-6ZW" secondAttribute="trailing" constant="20" symbolic="YES" type="default" id="gAH-4W-K42"/> <constraint firstItem="OLN-e5-oOe" firstAttribute="leading" secondItem="Wfz-bK-fv9" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="lYU-wl-w14"/> |