From 3c90249dbf055d9e1d933e3af41e2b19d0a0a8ea Mon Sep 17 00:00:00 2001 From: Henna Date: Sat, 6 Jun 2015 17:42:50 -0400 Subject: [PATCH] Made a BASIC sign-up form --- .../xcshareddata/IfElse.xccheckout | 20 +- .../UserInterfaceState.xcuserstate | Bin 0 -> 15392 bytes .../xcschemes/IfElse.xcscheme | 112 +++++++ .../xcschemes/xcschememanagement.plist | 27 ++ IfElse/IfElse/Base.lproj/Main.storyboard | 302 ++++++++++++++++-- IfElse/IfElse/ViewController.m | 43 ++- 6 files changed, 452 insertions(+), 52 deletions(-) create mode 100644 IfElse/IfElse.xcodeproj/project.xcworkspace/xcuserdata/Afsana.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 IfElse/IfElse.xcodeproj/xcuserdata/Afsana.xcuserdatad/xcschemes/IfElse.xcscheme create mode 100644 IfElse/IfElse.xcodeproj/xcuserdata/Afsana.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/IfElse/IfElse.xcodeproj/project.xcworkspace/xcshareddata/IfElse.xccheckout b/IfElse/IfElse.xcodeproj/project.xcworkspace/xcshareddata/IfElse.xccheckout index c528788..6d80a9d 100644 --- a/IfElse/IfElse.xcodeproj/project.xcworkspace/xcshareddata/IfElse.xccheckout +++ b/IfElse/IfElse.xcodeproj/project.xcworkspace/xcshareddata/IfElse.xccheckout @@ -7,34 +7,34 @@ IDESourceControlProjectIdentifier 1FB1EB48-B010-423E-B8FC-A6EF94AD96F8 IDESourceControlProjectName - project + IfElse IDESourceControlProjectOriginsDictionary - 871AD5BEB35E842816B7B3CF4033C4298E764D23 - https://github.com/accesscode-2-2/unit-0.git + BAD0033D05756E529C5FF0EABC2DBC15B8B8219E + https://github.com/xhenna92/IfElse.git IDESourceControlProjectPath - lessons/week-0/IfElse/IfElse.xcodeproj/project.xcworkspace + IfElse/IfElse.xcodeproj IDESourceControlProjectRelativeInstallPathDictionary - 871AD5BEB35E842816B7B3CF4033C4298E764D23 - ../../../../.. + BAD0033D05756E529C5FF0EABC2DBC15B8B8219E + ../../.. IDESourceControlProjectURL - https://github.com/accesscode-2-2/unit-0.git + https://github.com/xhenna92/IfElse.git IDESourceControlProjectVersion 111 IDESourceControlProjectWCCIdentifier - 871AD5BEB35E842816B7B3CF4033C4298E764D23 + BAD0033D05756E529C5FF0EABC2DBC15B8B8219E IDESourceControlProjectWCConfigurations IDESourceControlRepositoryExtensionIdentifierKey public.vcs.git IDESourceControlWCCIdentifierKey - 871AD5BEB35E842816B7B3CF4033C4298E764D23 + BAD0033D05756E529C5FF0EABC2DBC15B8B8219E IDESourceControlWCCName - unit-0 + IfElse diff --git a/IfElse/IfElse.xcodeproj/project.xcworkspace/xcuserdata/Afsana.xcuserdatad/UserInterfaceState.xcuserstate b/IfElse/IfElse.xcodeproj/project.xcworkspace/xcuserdata/Afsana.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..acd599decf84fb1c10c09a665551e47003d12f57 GIT binary patch literal 15392 zcmcJ02V7HE8}~W)+&~B;A<7CQgd`*+WU<68TX7=GEsYQ%3JE3w#np4wT087s+S&@P zR$FarhuvCh?a(@F=iBYu-C8?r?fRaZn*dQezTfw~_=Du$v!3(J|MQ&Voc30i&u_P% zL>MuMAQp*GglMX0+EiVq)9Z72+*5U)IrE&2e%~~m!`s;6g4eY=zo%V}@am1b;xR>$ zNQ?%cfhYl4kQLdG9p#{0l!x+B0UCq~(O^`9N>LdqM-xyDszuY$Y}A0}qgK?0+{lC4 z(E{W}KC}?6M61vh=o)lAx&hsVHlVxFJ!m7^ingKq(Ie^?LkkX=h1%j0(uF( zj1HsM(JAyEdLMm&K13g(PtoV-YxF%jhknLl9EBw~8pq&R9Eat203L`Fa4Js2N}P?& z*n+LthV3{9=i)qEhzH~0xCEEtGCUp6z%%hIJR3LQ%di8_!Hu{HJMmoHj9ai5`>-E( z;AQwqyar!|ug2HlYw=oqJH7+2!|U;8yajK?+wep9VZ0kZj-SG>;zRf_ehnYNNAWTI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%skRuY%Vibn8%oBnqB5rv)jDD>^FCsFE_6;UunMDe64w%`EK(@bB}qOdAs=m z^Dgrq^8xcK=0oP!%qPsJ%x{_BF@IwI&V1JVz4=EAV-Z;*EfPztMQTa5C@pG>){<$- zwG>*0ScX}OETxtT%NR?wWrn52(q{2k7FaqhU6!Sm<(3;P>nz(X&spBG{9rj}IdA#h zimWMCjn!x^uuio$S?5|^)>f;>y2^T`^=j){>kZbMt#?^BS+`p6v)*srX?@E2jCHSd zzxAl~xb>v<4eKY?PpzL@zp{RB{mm9-i?K;<@ivpq0{>kq*OqS^VJoqf+s4?&+8S+h zZ7y4@&23v~TWniqyWDn%ZM|)SZKJKnw#D|O?HSu%+kV>t+dH=x@%L{{!Fz+UWoQ literal 0 HcmV?d00001 diff --git a/IfElse/IfElse.xcodeproj/xcuserdata/Afsana.xcuserdatad/xcschemes/IfElse.xcscheme b/IfElse/IfElse.xcodeproj/xcuserdata/Afsana.xcuserdatad/xcschemes/IfElse.xcscheme new file mode 100644 index 0000000..6485954 --- /dev/null +++ b/IfElse/IfElse.xcodeproj/xcuserdata/Afsana.xcuserdatad/xcschemes/IfElse.xcscheme @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IfElse/IfElse.xcodeproj/xcuserdata/Afsana.xcuserdatad/xcschemes/xcschememanagement.plist b/IfElse/IfElse.xcodeproj/xcuserdata/Afsana.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..44aa48b --- /dev/null +++ b/IfElse/IfElse.xcodeproj/xcuserdata/Afsana.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,27 @@ + + + + + SchemeUserState + + IfElse.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 8DFE63E81B22A54400D3D7AA + + primary + + + 8DFE64011B22A54400D3D7AA + + primary + + + + + diff --git a/IfElse/IfElse/Base.lproj/Main.storyboard b/IfElse/IfElse/Base.lproj/Main.storyboard index 34c014c..c726bf9 100644 --- a/IfElse/IfElse/Base.lproj/Main.storyboard +++ b/IfElse/IfElse/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + + @@ -17,104 +18,335 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IfElse/IfElse/ViewController.m b/IfElse/IfElse/ViewController.m index b3ee131..ceeb47c 100644 --- a/IfElse/IfElse/ViewController.m +++ b/IfElse/IfElse/ViewController.m @@ -9,19 +9,48 @@ #import "ViewController.h" @interface ViewController () +@property (weak, nonatomic) IBOutlet UITextField *cond1; +@property (weak, nonatomic) IBOutlet UITextField *cond2; +@property (weak, nonatomic) IBOutlet UITextField *cond3; +@property (weak, nonatomic) IBOutlet UILabel *outputLabel; @end @implementation ViewController -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. +- (IBAction)onSubmit:(id)sender { + NSString *name = self.cond1.text, + *email = self.cond2.text, + *emailVerify = self.cond3.text; + + + BOOL nameExists = [name length]; + BOOL emailsAreSame = [email isEqualToString:emailVerify]; + + BOOL isEmail = [email rangeOfString:@"^.+@.+\\..{2,}$" options:NSRegularExpressionSearch].location != NSNotFound; + BOOL isEmailV = [emailVerify rangeOfString:@"^.+@.+\\..{2,}$" options:NSRegularExpressionSearch].location != NSNotFound; + + if(nameExists){ + if (isEmail && isEmailV) { + + if(emailsAreSame){ + self.outputLabel.text = [NSString stringWithFormat:@"Welcome %@!", name]; + } + else { + self.outputLabel.text = [NSString stringWithFormat:@"Emails not the same"]; + } + } + else { + self.outputLabel.text = [NSString stringWithFormat:@"Please enter valid e-mail addresses"]; + } + } + else { + self.outputLabel.text = [NSString stringWithFormat:@"Please enter your name"]; + } + + + } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} @end