From 5d5fd5ece3dbeeca9e770402cee5c040f00ff234 Mon Sep 17 00:00:00 2001 From: Eddie Ehlin Date: Sun, 24 Feb 2013 19:45:23 +0100 Subject: UITextView on BeanCollectionInfo is now styled to look as a UITextField. --- .../UserInterfaceState.xcuserstate | Bin 51633 -> 51051 bytes iBean/iBean/BeanCollectionInfoViewController.h | 1 + iBean/iBean/BeanCollectionInfoViewController.m | 11 ++++++++++- iBean/iBean/iPhoneStoryboard.storyboard | 19 ++++++++++++++----- 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 Binary files a/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate and b/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate 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 @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 @@ - - + + - + + + + @@ -665,16 +668,20 @@ - + + + + + @@ -709,6 +716,7 @@ + @@ -1334,6 +1342,7 @@ + @@ -1430,7 +1439,7 @@ - + -- cgit v1.2.3