From b42efbd2f9e1c322e501b8ef9b8f2cec10305949 Mon Sep 17 00:00:00 2001 From: Miles Crabbe Date: Tue, 1 Jul 2014 10:37:29 -0500 Subject: [PATCH] -slight change in design of the user info page --- .../CommentViewController.xib | 4 +-- .../UniversityPrograms/MyUPViewController.m | 17 ++++++++---- .../UpcomingEventViewController.m | 1 + .../UpcomingEventViewController.xib | 2 +- .../UpcomingEventsTableViewCell.xib | 4 +-- .../UserInfoViewController.m | 26 ++++++++++++------- .../UserInfoViewController.xib | 18 ++++++++----- 7 files changed, 46 insertions(+), 26 deletions(-) diff --git a/UniversityPrograms/UniversityPrograms/CommentViewController.xib b/UniversityPrograms/UniversityPrograms/CommentViewController.xib index d45d0af..38e11a2 100644 --- a/UniversityPrograms/UniversityPrograms/CommentViewController.xib +++ b/UniversityPrograms/UniversityPrograms/CommentViewController.xib @@ -48,12 +48,12 @@ - + - + diff --git a/UniversityPrograms/UniversityPrograms/MyUPViewController.m b/UniversityPrograms/UniversityPrograms/MyUPViewController.m index f332d86..3562599 100644 --- a/UniversityPrograms/UniversityPrograms/MyUPViewController.m +++ b/UniversityPrograms/UniversityPrograms/MyUPViewController.m @@ -38,7 +38,7 @@ @interface MyUPViewController () @property NSArray *unsortedEventArray; @property NSMutableArray *sortedEventArray; @property UIRefreshControl *refreshControl; - +@property BOOL buttonControlFlag; @property BOOL controlFlag; @end @@ -80,7 +80,7 @@ -(void)viewWillAppear:(BOOL)animated{ [self loadData]; [self build]; [self.selectorControl setEnabled:YES forSegmentAtIndex:0]; - + self.buttonControlFlag = NO; [self.myUPTableView scrollRectToVisible:CGRectMake(0, 0, 320, 125) animated:NO]; } @@ -185,14 +185,21 @@ - (IBAction)changedCategories:(id)sender { [self.myUPTableView scrollRectToVisible:CGRectMake(0, 0, 320, 125) animated:NO]; } -(void)didSelectComment{ + + self.navigationController.navigationItem.rightBarButtonItem.enabled = NO; CommentViewController *comments = [[CommentViewController alloc] init]; - [self.navigationController pushViewController:comments - animated:YES]; -} + [self.navigationController pushViewController:comments animated:YES]; + self.navigationController.navigationItem.rightBarButtonItem.enabled = YES; + + +} -(void)didSelectSettings{ + + self.navigationController.navigationItem.leftBarButtonItem.enabled = NO; SettingsViewController *settings = [[SettingsViewController alloc] init]; [self.navigationController pushViewController:settings animated:YES]; + self.navigationController.navigationItem.leftBarButtonItem.enabled = YES; } diff --git a/UniversityPrograms/UniversityPrograms/UpcomingEventViewController.m b/UniversityPrograms/UniversityPrograms/UpcomingEventViewController.m index fd23c21..32fc21a 100644 --- a/UniversityPrograms/UniversityPrograms/UpcomingEventViewController.m +++ b/UniversityPrograms/UniversityPrograms/UpcomingEventViewController.m @@ -62,6 +62,7 @@ -(void)viewWillAppear:(BOOL)animated{ if(self.child){ [self.child viewWillAppear:NO]; } + self.upComingEventsTable.separatorColor = [UIColor getThemeColor]; self.upComingEventsTable.backgroundColor = [UIColor getStyleColor]; //[self.upComingEventsTable reloadData]; //[self.upComingEventsTable scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:NO]; diff --git a/UniversityPrograms/UniversityPrograms/UpcomingEventViewController.xib b/UniversityPrograms/UniversityPrograms/UpcomingEventViewController.xib index 42f3666..fd63e9e 100644 --- a/UniversityPrograms/UniversityPrograms/UpcomingEventViewController.xib +++ b/UniversityPrograms/UniversityPrograms/UpcomingEventViewController.xib @@ -16,7 +16,7 @@ - + diff --git a/UniversityPrograms/UniversityPrograms/UpcomingEventsTableViewCell.xib b/UniversityPrograms/UniversityPrograms/UpcomingEventsTableViewCell.xib index bbe9b8c..1d3478b 100644 --- a/UniversityPrograms/UniversityPrograms/UpcomingEventsTableViewCell.xib +++ b/UniversityPrograms/UniversityPrograms/UpcomingEventsTableViewCell.xib @@ -14,7 +14,7 @@ - + @@ -40,7 +40,7 @@ - + diff --git a/UniversityPrograms/UniversityPrograms/UserInfoViewController.m b/UniversityPrograms/UniversityPrograms/UserInfoViewController.m index a3b2fef..6d89580 100644 --- a/UniversityPrograms/UniversityPrograms/UserInfoViewController.m +++ b/UniversityPrograms/UniversityPrograms/UserInfoViewController.m @@ -20,6 +20,7 @@ @interface UserInfoViewController () @property (weak, nonatomic) IBOutlet UIView *firstDivider; @property (weak, nonatomic) IBOutlet UIView *secondDivider; @property (weak, nonatomic) IBOutlet UIView *thirdDivider; +@property (weak, nonatomic) IBOutlet UIView *fourthDivider; @property (weak, nonatomic) IBOutlet UILabel *notificationLabel; @property UIBarStyle *currentSyle; @@ -55,22 +56,27 @@ - (void)viewDidLoad } -(void)viewWillAppear:(BOOL)animated{ - self.view.backgroundColor = [UIColor getStyleColor]; - self.notificationLabel.backgroundColor = [UIColor getStyleColor]; - self.notificationLabel.textColor = [UIColor getTextColor]; - self.firstName.textColor = [UIColor getTextColor]; - self.lastName.textColor = [UIColor getTextColor]; - self.email.textColor =[UIColor getTextColor]; - self.cwid.textColor = [UIColor getTextColor]; + UIColor *themeColor = [UIColor getThemeColor]; + UIColor *textColor = [UIColor getTextColor]; + UIColor *styleColor = [UIColor getStyleColor]; + + self.view.backgroundColor = styleColor; + self.notificationLabel.backgroundColor = styleColor; + self.notificationLabel.textColor = textColor; + self.firstName.textColor = textColor; + self.lastName.textColor = textColor; + self.email.textColor =textColor; + self.cwid.textColor = textColor; //self.firstName.tintColor = [UIColor getThemeColor]; self.firstName.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"First Name" attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}]; self.lastName.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"Last Name" attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}]; self.cwid.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"CWID" attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}]; self.email.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"Email" attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}]; - self.firstDivider.backgroundColor = [UIColor getThemeColor]; - self.secondDivider.backgroundColor = [UIColor getThemeColor]; - self.thirdDivider.backgroundColor = [UIColor getThemeColor]; + self.firstDivider.backgroundColor = themeColor; + self.secondDivider.backgroundColor = themeColor; + self.thirdDivider.backgroundColor = themeColor; + self.fourthDivider.backgroundColor = themeColor; if([[NSUserDefaults standardUserDefaults]boolForKey:@"darkMode"]){ self.email.keyboardAppearance = UIKeyboardAppearanceDark; self.cwid.keyboardAppearance = UIKeyboardAppearanceDark; diff --git a/UniversityPrograms/UniversityPrograms/UserInfoViewController.xib b/UniversityPrograms/UniversityPrograms/UserInfoViewController.xib index 22352a8..6905ddf 100644 --- a/UniversityPrograms/UniversityPrograms/UserInfoViewController.xib +++ b/UniversityPrograms/UniversityPrograms/UserInfoViewController.xib @@ -10,6 +10,7 @@ + @@ -22,7 +23,7 @@ - + @@ -31,7 +32,7 @@ - + @@ -40,7 +41,7 @@ - + @@ -49,7 +50,7 @@ - + @@ -63,15 +64,20 @@ - + - + + + + + +