diff --git a/IfElse/IfElse.xcodeproj/project.xcworkspace/xcuserdata/Eric.xcuserdatad/UserInterfaceState.xcuserstate b/IfElse/IfElse.xcodeproj/project.xcworkspace/xcuserdata/Eric.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..f52f64a Binary files /dev/null and b/IfElse/IfElse.xcodeproj/project.xcworkspace/xcuserdata/Eric.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/IfElse/IfElse.xcodeproj/xcuserdata/Eric.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/IfElse/IfElse.xcodeproj/xcuserdata/Eric.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..fe2b454 --- /dev/null +++ b/IfElse/IfElse.xcodeproj/xcuserdata/Eric.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/IfElse/IfElse.xcodeproj/xcuserdata/Eric.xcuserdatad/xcschemes/IfElse.xcscheme b/IfElse/IfElse.xcodeproj/xcuserdata/Eric.xcuserdatad/xcschemes/IfElse.xcscheme new file mode 100644 index 0000000..6485954 --- /dev/null +++ b/IfElse/IfElse.xcodeproj/xcuserdata/Eric.xcuserdatad/xcschemes/IfElse.xcscheme @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IfElse/IfElse.xcodeproj/xcuserdata/Eric.xcuserdatad/xcschemes/xcschememanagement.plist b/IfElse/IfElse.xcodeproj/xcuserdata/Eric.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..44aa48b --- /dev/null +++ b/IfElse/IfElse.xcodeproj/xcuserdata/Eric.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..b40c976 100644 --- a/IfElse/IfElse/Base.lproj/Main.storyboard +++ b/IfElse/IfElse/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -35,22 +36,50 @@ + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -73,20 +102,23 @@ + + + - - - - - - + + + + + + + - @@ -95,26 +127,35 @@ + + + - - - - - - + + + + + + + - + + + + + + diff --git a/IfElse/IfElse/ViewController.h b/IfElse/IfElse/ViewController.h index 406a385..5c9db80 100644 --- a/IfElse/IfElse/ViewController.h +++ b/IfElse/IfElse/ViewController.h @@ -11,5 +11,8 @@ @interface ViewController : UIViewController + + + @end diff --git a/IfElse/IfElse/ViewController.m b/IfElse/IfElse/ViewController.m index b3ee131..ecf9ccc 100644 --- a/IfElse/IfElse/ViewController.m +++ b/IfElse/IfElse/ViewController.m @@ -9,19 +9,49 @@ #import "ViewController.h" @interface ViewController () +@property (weak, nonatomic) IBOutlet UITextField *textField1; +@property (weak, nonatomic) IBOutlet UITextField *textField2; +@property (weak, nonatomic) IBOutlet UITextField *textField3; +@property (weak, nonatomic) IBOutlet UITextField *textField4; +@property (weak, nonatomic) IBOutlet UITextField *textField5; +@property (weak, nonatomic) IBOutlet UISwitch *toggle; +@property (weak, nonatomic) IBOutlet UISlider *sliderCool; @end @implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. + - (IBAction)buttonTapped:(id)sender{ + NSLog(@"tapped"); + + NSString *one = self.textField1.text; + NSString *two = self.textField2.text; + NSString *three = self.textField3.text; + + + + BOOL oneEqualsTwo = [one isEqualToString:two]; + if (oneEqualsTwo) { + NSLog(@"first 2 are =="); + + BOOL twoEqualsThree = [two isEqualToString:three]; + + if (twoEqualsThree) { + [self.toggle setOn:YES animated:YES]; + NSLog(@"EQUAL"); + + + } else { + + [self.toggle setOn:NO animated:YES]; + + } + + } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. + + + } @end