diff --git a/IfElse/.DS_Store b/IfElse/.DS_Store new file mode 100644 index 0000000..4b4e7e2 Binary files /dev/null and b/IfElse/.DS_Store differ diff --git a/IfElse/IfElse.xcodeproj/project.xcworkspace/xcuserdata/jackiemeggesto.xcuserdatad/UserInterfaceState.xcuserstate b/IfElse/IfElse.xcodeproj/project.xcworkspace/xcuserdata/jackiemeggesto.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..b8e250f Binary files /dev/null and b/IfElse/IfElse.xcodeproj/project.xcworkspace/xcuserdata/jackiemeggesto.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/IfElse/IfElse.xcodeproj/xcuserdata/jackiemeggesto.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/IfElse/IfElse.xcodeproj/xcuserdata/jackiemeggesto.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..28a2eae --- /dev/null +++ b/IfElse/IfElse.xcodeproj/xcuserdata/jackiemeggesto.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,37 @@ + + + + + + + + + + + + + diff --git a/IfElse/IfElse.xcodeproj/xcuserdata/jackiemeggesto.xcuserdatad/xcschemes/IfElse.xcscheme b/IfElse/IfElse.xcodeproj/xcuserdata/jackiemeggesto.xcuserdatad/xcschemes/IfElse.xcscheme new file mode 100644 index 0000000..6485954 --- /dev/null +++ b/IfElse/IfElse.xcodeproj/xcuserdata/jackiemeggesto.xcuserdatad/xcschemes/IfElse.xcscheme @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IfElse/IfElse.xcodeproj/xcuserdata/jackiemeggesto.xcuserdatad/xcschemes/xcschememanagement.plist b/IfElse/IfElse.xcodeproj/xcuserdata/jackiemeggesto.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..44aa48b --- /dev/null +++ b/IfElse/IfElse.xcodeproj/xcuserdata/jackiemeggesto.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..62becc9 100644 --- a/IfElse/IfElse/Base.lproj/Main.storyboard +++ b/IfElse/IfElse/Base.lproj/Main.storyboard @@ -2,6 +2,7 @@ + @@ -35,6 +36,9 @@ + + + @@ -51,6 +55,12 @@ + + + + + + @@ -73,20 +83,21 @@ + - - - - - - + + + + + + + - @@ -95,23 +106,30 @@ + - - - - - - + + + + + + + - + + + + + + diff --git a/IfElse/IfElse/ViewController.m b/IfElse/IfElse/ViewController.m index b3ee131..069e73d 100644 --- a/IfElse/IfElse/ViewController.m +++ b/IfElse/IfElse/ViewController.m @@ -10,18 +10,42 @@ @interface ViewController () +@property (weak, nonatomic) IBOutlet UITextField *textField1; +@property (weak, nonatomic) IBOutlet UITextField *textField2; +@property (weak, nonatomic) IBOutlet UITextField *textField3; + +@property (weak, nonatomic) IBOutlet UIProgressView *progressBar; + @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.textField1.text; + NSString *three = self.textField1.text; + + if ([one isEqualToString:(@"33")]) { + [self.progressBar setProgress:(.50)]; + NSLog(@"You've cracked the code!"); + } else if ([one isEqualToString:(@"22")]) { + NSLog(@"You've made some progress...!"); + [self.progressBar setProgress:(.33)]; + } else if ([one isEqualToString:(@"66")]){ + [self.progressBar setProgress:(.66)]; + NSLog(@"Making more progress now!"); + } else { + [self.progressBar setProgress:(.99)]; + NSLog(@"Good job! Full progress!"); + } + + + + } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} + @end