From cd2742b1bb83dbb64f771938e168c15d72277842 Mon Sep 17 00:00:00 2001 From: Miles Crabbe Date: Fri, 20 Jun 2014 15:59:33 -0500 Subject: [PATCH] -stuff --- UniversityPrograms/UniversityPrograms/MyUPViewController.m | 2 +- .../UniversityPrograms/UserInfoViewController.m | 5 +++-- .../UniversityPrograms/UserInfoViewController.xib | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/UniversityPrograms/UniversityPrograms/MyUPViewController.m b/UniversityPrograms/UniversityPrograms/MyUPViewController.m index c2d65e7..5061124 100644 --- a/UniversityPrograms/UniversityPrograms/MyUPViewController.m +++ b/UniversityPrograms/UniversityPrograms/MyUPViewController.m @@ -151,7 +151,7 @@ -(void)build{ self.emailLabel.text= [[NSUserDefaults standardUserDefaults] stringForKey:@"email"]; } - + self.myUPTableView.separatorColor = [UIColor getThemeColor]; self.cwidLabel.textColor = textColor; self.emailLabel.textColor = textColor; self.firstNameLabel.textColor = themeColor; diff --git a/UniversityPrograms/UniversityPrograms/UserInfoViewController.m b/UniversityPrograms/UniversityPrograms/UserInfoViewController.m index 35f121a..b0872a6 100644 --- a/UniversityPrograms/UniversityPrograms/UserInfoViewController.m +++ b/UniversityPrograms/UniversityPrograms/UserInfoViewController.m @@ -48,7 +48,8 @@ - (void)viewDidLoad self.cwid.text=[[NSUserDefaults standardUserDefaults] stringForKey:@"cwid"]; self.email.text=[[NSUserDefaults standardUserDefaults] stringForKey:@"email"]; - + self.firstName.autocapitalizationType = UITextAutocapitalizationTypeWords; + self.lastName.autocapitalizationType = UITextAutocapitalizationTypeWords; // Do any additional setup after loading the view from its nib. @@ -132,7 +133,7 @@ - (BOOL)validateString:(NSString *)string withPattern:(NSString *)pattern - (void)saveInfo{ - if([self.cwid.text length]<8 || [self.cwid.text length]>8||![self validateString:self.cwid.text withPattern:@"^[0-9]{8}$"] || ![self validateString:self.lastName.text withPattern:@"^[a-zA-Z]{1,}$"]|| ![self validateString:self.email.text withPattern:@"^[a-zA-Z]{1,64}@(?:crimson)|(?:bama)\\.ua\\.edu$"]||![self validateString:self.firstName.text withPattern:@"^[a-zA-Z]{1,}$"]){ + if([self.cwid.text length]<8 || [self.cwid.text length]>8||![self validateString:self.cwid.text withPattern:@"^[0-9]{8}$"] || ![self validateString:self.lastName.text withPattern:@"^[a-zA-Z]{1,}$"]|| ![self validateString:self.email.text withPattern:@"^[a-zA-Z][a-zA-Z0-9]{1,63}@[a-zA-Z0-9]{1,64}(?:\\.[a-zA-Z0-9]{2,64})*\\.[a-zA-Z]{3,5}$"]||![self validateString:self.firstName.text withPattern:@"^[a-zA-Z]{1,}$"]){ [self addInvalidAlertView]; } diff --git a/UniversityPrograms/UniversityPrograms/UserInfoViewController.xib b/UniversityPrograms/UniversityPrograms/UserInfoViewController.xib index 50f05e6..22352a8 100644 --- a/UniversityPrograms/UniversityPrograms/UserInfoViewController.xib +++ b/UniversityPrograms/UniversityPrograms/UserInfoViewController.xib @@ -25,7 +25,7 @@ - +