aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Ehlin <eddiex@eddiex.se>2013-02-24 19:45:23 +0100
committerEddie Ehlin <eddiex@eddiex.se>2013-02-24 19:45:23 +0100
commit5d5fd5ece3dbeeca9e770402cee5c040f00ff234 (patch)
tree00a0ea6e8739016330496510e22c1d4aaca2df34
parentb9c856adaad9c7b90ead2bf78c76c34936216f13 (diff)
downloadiBean-5d5fd5ece3dbeeca9e770402cee5c040f00ff234.tar.gz
iBean-5d5fd5ece3dbeeca9e770402cee5c040f00ff234.zip
UITextView on BeanCollectionInfo is now styled to look as a UITextField.
-rw-r--r--iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstatebin51633 -> 51051 bytes
-rw-r--r--iBean/iBean/BeanCollectionInfoViewController.h1
-rw-r--r--iBean/iBean/BeanCollectionInfoViewController.m11
-rw-r--r--iBean/iBean/iPhoneStoryboard.storyboard19
4 files changed, 25 insertions, 6 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 601cbfa..be5f765 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/BeanCollectionInfoViewController.h b/iBean/iBean/BeanCollectionInfoViewController.h
index 3394d52..eda2c40 100644
--- a/iBean/iBean/BeanCollectionInfoViewController.h
+++ b/iBean/iBean/BeanCollectionInfoViewController.h
@@ -25,6 +25,7 @@
@property (weak, nonatomic) IBOutlet UITextView *beanCollectionNoteTextView;
@property (weak, nonatomic) IBOutlet UIScrollView *beanCollectionScrollView;
@property (strong, nonatomic) IBOutlet UIBarButtonItem *beanCollectionNextButton;
+@property (weak, nonatomic) IBOutlet UIView *beanCollectionNoteTextViewShadowView;
/* UI Actions */
- (IBAction) cancelBeanCollection:(id)sender;
diff --git a/iBean/iBean/BeanCollectionInfoViewController.m b/iBean/iBean/BeanCollectionInfoViewController.m
index d8d9cf9..d04d313 100644
--- a/iBean/iBean/BeanCollectionInfoViewController.m
+++ b/iBean/iBean/BeanCollectionInfoViewController.m
@@ -10,6 +10,7 @@
#import "BeanCollectionBeanListViewController.h"
#import "AppDelegate+Storage.h"
#import "BeanCollection.h"
+#import <QuartzCore/QuartzCore.h>
@interface BeanCollectionInfoViewController ()
@@ -30,6 +31,14 @@
{
[super viewDidLoad];
// Do any additional setup after loading the view.
+
+ //Style the UITextView to look like a UITextField
+ self.beanCollectionNoteTextView.layer.cornerRadius = 6.0f;
+ self.beanCollectionNoteTextViewShadowView.layer.cornerRadius = self.beanCollectionNoteTextView.layer.cornerRadius;
+ self.beanCollectionNoteTextViewShadowView.layer.shadowOpacity = 0.8f;
+ self.beanCollectionNoteTextViewShadowView.layer.shadowColor = [[UIColor lightGrayColor] CGColor];
+ self.beanCollectionNoteTextViewShadowView.layer.shadowOffset = CGSizeMake(0.0f, -2.5f);
+ self.beanCollectionNoteTextViewShadowView.layer.shadowRadius = 0.9f;
}
- (void) viewWillAppear:(BOOL)animated
@@ -122,7 +131,7 @@
//Allocate text view&field done button, which will replace Next button when needed.
self.beanCollectionTextViewDoneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self.beanCollectionNoteTextView action:@selector(resignFirstResponder)];
- self.beanCollectionTextFieldDoneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self.beanCollectionNameTextField action:@selector(resignFirstResponder)];
+ self.beanCollectionTextFieldDoneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self.beanCollectionNameTextField action:@selector(resignFirstResponder)];
}
- (void) initWithModeAndBeanCollection:(BOOL)editMode :(BeanCollection *)bc
diff --git a/iBean/iBean/iPhoneStoryboard.storyboard b/iBean/iBean/iPhoneStoryboard.storyboard
index 6086ee1..ece0e9a 100644
--- a/iBean/iBean/iPhoneStoryboard.storyboard
+++ b/iBean/iBean/iPhoneStoryboard.storyboard
@@ -652,11 +652,14 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JHg-Fk-IL0">
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ktV-Xg-GPh">
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
- <constraint firstAttribute="height" constant="368" id="eyQ-2Q-yaW"/>
+ <constraint firstAttribute="height" constant="375" id="hle-b5-Ef6"/>
</constraints>
+ </view>
+ <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JHg-Fk-IL0">
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
<connections>
@@ -665,16 +668,20 @@
</textView>
</subviews>
<constraints>
- <constraint firstItem="JHg-Fk-IL0" firstAttribute="centerX" secondItem="gb9-GM-dee" secondAttribute="centerX" type="default" id="1lL-s7-sRw"/>
<constraint firstItem="X5J-eE-KuX" firstAttribute="leading" secondItem="gb9-GM-dee" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="26U-lr-78J"/>
+ <constraint firstAttribute="trailing" secondItem="ktV-Xg-GPh" secondAttribute="trailing" constant="20" symbolic="YES" type="default" id="8dQ-jW-ABt"/>
<constraint firstItem="X5J-eE-KuX" firstAttribute="top" secondItem="gb9-GM-dee" secondAttribute="top" constant="20" symbolic="YES" type="default" id="BvG-pg-Ome"/>
+ <constraint firstItem="ktV-Xg-GPh" firstAttribute="centerX" secondItem="gb9-GM-dee" secondAttribute="centerX" type="default" id="F7y-y4-h92"/>
+ <constraint firstAttribute="bottom" secondItem="ktV-Xg-GPh" secondAttribute="bottom" constant="13" id="FG6-aK-srB"/>
<constraint firstAttribute="bottom" secondItem="JHg-Fk-IL0" secondAttribute="bottom" constant="20" symbolic="YES" type="default" id="IFE-uf-7iS"/>
<constraint firstItem="JHg-Fk-IL0" firstAttribute="leading" secondItem="gb9-GM-dee" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="JfD-PW-BjZ"/>
<constraint firstItem="HFn-UM-1hs" firstAttribute="top" secondItem="Vla-ab-hH3" secondAttribute="bottom" constant="8" symbolic="YES" type="default" id="Lcl-Wf-kfY"/>
+ <constraint firstItem="ktV-Xg-GPh" firstAttribute="leading" secondItem="gb9-GM-dee" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="NM1-Z9-sRH"/>
<constraint firstAttribute="trailing" secondItem="Vla-ab-hH3" secondAttribute="trailing" constant="20" symbolic="YES" type="default" id="Vgq-bP-iLT"/>
<constraint firstAttribute="trailing" secondItem="X5J-eE-KuX" secondAttribute="trailing" constant="20" symbolic="YES" type="default" id="cjV-0g-YWu"/>
<constraint firstItem="JHg-Fk-IL0" firstAttribute="top" secondItem="HFn-UM-1hs" secondAttribute="bottom" constant="8" symbolic="YES" type="default" id="czz-nF-pd8"/>
<constraint firstItem="Vla-ab-hH3" firstAttribute="leading" secondItem="gb9-GM-dee" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="iyC-ja-8lm"/>
+ <constraint firstItem="ktV-Xg-GPh" firstAttribute="top" secondItem="HFn-UM-1hs" secondAttribute="bottom" constant="8" symbolic="YES" type="default" id="l6z-KC-p5E"/>
<constraint firstAttribute="trailing" secondItem="HFn-UM-1hs" secondAttribute="trailing" constant="20" symbolic="YES" type="default" id="lpz-Su-Wdn"/>
<constraint firstItem="Vla-ab-hH3" firstAttribute="top" secondItem="X5J-eE-KuX" secondAttribute="bottom" constant="8" symbolic="YES" type="default" id="pAZ-qM-Sm7"/>
<constraint firstItem="HFn-UM-1hs" firstAttribute="leading" secondItem="gb9-GM-dee" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="rRh-JP-w0C"/>
@@ -709,6 +716,7 @@
<outlet property="beanCollectionNameTextField" destination="Vla-ab-hH3" id="ZEz-IX-3Di"/>
<outlet property="beanCollectionNextButton" destination="HeX-Kh-3ba" id="HdC-M9-1cq"/>
<outlet property="beanCollectionNoteTextView" destination="JHg-Fk-IL0" id="48Y-nc-5uX"/>
+ <outlet property="beanCollectionNoteTextViewShadowView" destination="ktV-Xg-GPh" id="nQg-0D-kAQ"/>
<outlet property="beanCollectionScrollView" destination="gb9-GM-dee" id="jSv-s1-WgA"/>
<segue destination="C1o-is-nML" kind="modal" identifier="BeanCollectionInfoCancelSegue" modalTransitionStyle="crossDissolve" id="OPZ-Pj-2Dz"/>
</connections>
@@ -1334,6 +1342,7 @@
<relationship kind="outlet" name="beanCollectionNameTextField" candidateClass="UITextField"/>
<relationship kind="outlet" name="beanCollectionNextButton" candidateClass="UIBarButtonItem"/>
<relationship kind="outlet" name="beanCollectionNoteTextView" candidateClass="UITextView"/>
+ <relationship kind="outlet" name="beanCollectionNoteTextViewShadowView" candidateClass="UIView"/>
<relationship kind="outlet" name="beanCollectionScrollView" candidateClass="UIScrollView"/>
</relationships>
</class>
@@ -1430,7 +1439,7 @@
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
- <segue reference="CyX-df-8ge"/>
+ <segue reference="OPZ-Pj-2Dz"/>
<segue reference="8Kh-dv-G2O"/>
<segue reference="qk2-F5-M1s"/>
</inferredMetricsTieBreakers>