diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/ChangingBackground.xcodeproj/project.pbxproj b/ChangingBackground.xcodeproj/project.pbxproj old mode 100644 new mode 100755 index 2e16be1..7e706ad --- a/ChangingBackground.xcodeproj/project.pbxproj +++ b/ChangingBackground.xcodeproj/project.pbxproj @@ -42,7 +42,7 @@ 001809CE171C637E002D3E93 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 001809D6171C6448002D3E93 /* FirstViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = ""; }; 001809D7171C6448002D3E93 /* FirstViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = ""; }; - 001809D8171C6448002D3E93 /* FirstViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FirstViewController.xib; sourceTree = ""; }; + 001809D8171C6448002D3E93 /* FirstViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = FirstViewController.xib; path = "/Users/charles/CodingChallenge/ChangingBackground-master/ChangingBackground/FirstViewController.xib"; sourceTree = ""; }; 001809DD171C64E3002D3E93 /* SecondViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = ""; }; 001809DE171C64E3002D3E93 /* SecondViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; }; 001809DF171C64E3002D3E93 /* SecondViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SecondViewController.xib; sourceTree = ""; }; @@ -356,6 +356,7 @@ 001809D4171C637E002D3E93 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/ChangingBackground/AppDelegate.h b/ChangingBackground/AppDelegate.h old mode 100644 new mode 100755 diff --git a/ChangingBackground/AppDelegate.m b/ChangingBackground/AppDelegate.m old mode 100644 new mode 100755 index 9538cc1..4db04ba --- a/ChangingBackground/AppDelegate.m +++ b/ChangingBackground/AppDelegate.m @@ -8,6 +8,8 @@ #import "AppDelegate.h" #import "FirstViewController.h" +#import "SecondViewController.h" + @interface AppDelegate () { UIWindow *window; @@ -22,9 +24,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [window makeKeyAndVisible]; FirstViewController *firstViewController = FirstViewController.new; + + firstViewController.view.backgroundColor = [UIColor clearColor]; UINavigationController *navigationController = [UINavigationController.alloc initWithRootViewController:firstViewController]; [navigationController setNavigationBarHidden:YES]; + UIImage* backGroundImage = [UIImage imageNamed:@"blue"]; + UIImageView* backGround = [[UIImageView alloc]initWithImage:backGroundImage]; + [window addSubview:backGround]; window.rootViewController = navigationController; return YES; diff --git a/ChangingBackground/ChangingBackground-Info.plist b/ChangingBackground/ChangingBackground-Info.plist old mode 100644 new mode 100755 diff --git a/ChangingBackground/ChangingBackground-Prefix.pch b/ChangingBackground/ChangingBackground-Prefix.pch old mode 100644 new mode 100755 diff --git a/ChangingBackground/Default-568h@2x.png b/ChangingBackground/Default-568h@2x.png old mode 100644 new mode 100755 diff --git a/ChangingBackground/Default.png b/ChangingBackground/Default.png old mode 100644 new mode 100755 diff --git a/ChangingBackground/Default@2x.png b/ChangingBackground/Default@2x.png old mode 100644 new mode 100755 diff --git a/ChangingBackground/FirstViewController.h b/ChangingBackground/FirstViewController.h old mode 100644 new mode 100755 diff --git a/ChangingBackground/FirstViewController.m b/ChangingBackground/FirstViewController.m old mode 100644 new mode 100755 index 8aedb68..bc7c1c6 --- a/ChangingBackground/FirstViewController.m +++ b/ChangingBackground/FirstViewController.m @@ -11,13 +11,59 @@ @interface FirstViewController () +@property (weak, nonatomic) IBOutlet UIButton *goForwardButton; +@property (weak, nonatomic) IBOutlet UILabel *viewControllerLabel; + + @end @implementation FirstViewController + +-(void)viewWillAppear:(BOOL)animated +{ + [UIView animateWithDuration:.25 animations:^{ + self.viewControllerLabel.alpha = 1.0; + self.goForwardButton.alpha = 1.0; + } completion:^(BOOL finished) { + }]; +} + +-(void)viewDidAppear:(BOOL)animated +{ + + [UIView animateWithDuration:0.5 animations:^{ + for (UIImageView* backGround in [[[UIApplication sharedApplication] keyWindow] subviews] + ) { + if ([backGround isMemberOfClass:([UIImageView class])]) { + backGround.alpha = 0.0; + } + + } + } completion:^(BOOL finished) { + [UIView animateWithDuration:0.5 animations:^{ + for (UIImageView* backGround in [[[UIApplication sharedApplication] keyWindow] subviews] + ) { + if ([backGround isMemberOfClass:([UIImageView class])]) { + backGround.image = [UIImage imageNamed:@"blue"]; + backGround.alpha = 1.0; + } + + } + }]; + }]; + + +} + - (IBAction)goForwardButtonPressed { SecondViewController *secondViewController = SecondViewController.new; + secondViewController.view.backgroundColor = [UIColor clearColor]; + [UIView animateWithDuration:.25 animations:^{ + self.viewControllerLabel.alpha = 0.0; + self.goForwardButton.alpha = 0.0; + } completion:^(BOOL finished) { + }]; [self.navigationController pushViewController:secondViewController animated:YES]; } - @end diff --git a/ChangingBackground/FirstViewController.xib b/ChangingBackground/FirstViewController.xib old mode 100644 new mode 100755 index 0dd58c2..b03249a --- a/ChangingBackground/FirstViewController.xib +++ b/ChangingBackground/FirstViewController.xib @@ -1,217 +1,44 @@ - - - - 1552 - 12C3006 - 3084 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 2083 - - - IBProxyObject - IBUIButton - IBUILabel - IBUIView - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - - - 292 - {{77, 115}, {166, 21}} - - - _NS:9 - NO - YES - 7 - NO - IBCocoaTouchFramework - Home View Controller - - 1 - MCAwIDAAA - darkTextColor - - - 0 - - 1 - 17 - - - Helvetica - 17 - 16 - - NO - - - - 292 - {{102, 180}, {109, 44}} - - _NS:9 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - Go Forward - - 3 - MQA - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - 2 - 15 - - - Helvetica-Bold - 15 - 16 - - - - {{0, 20}, {320, 548}} - - - 3 - MQA - - 2 - - - - - IBUIScreenMetrics - - YES - - - - - - {320, 568} - {568, 320} - - - IBCocoaTouchFramework - Retina 4 Full Screen - 2 - - IBCocoaTouchFramework - - - - - - - view - - - - 3 - - - - goForwardButtonPressed - - - 7 - - 8 - - - - - - 0 - - - - - - 1 - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 7 - - - - - - - FirstViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 8 - - - 0 - IBCocoaTouchFramework - YES - 3 - 2083 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ChangingBackground/SecondViewController.h b/ChangingBackground/SecondViewController.h old mode 100644 new mode 100755 diff --git a/ChangingBackground/SecondViewController.m b/ChangingBackground/SecondViewController.m old mode 100644 new mode 100755 index 028f811..e933196 --- a/ChangingBackground/SecondViewController.m +++ b/ChangingBackground/SecondViewController.m @@ -11,6 +11,31 @@ @implementation SecondViewController + +-(void)viewDidAppear:(BOOL)animated{ + + [UIView animateWithDuration:0.5 animations:^{ + for (UIImageView* backGround in [[[UIApplication sharedApplication] keyWindow] subviews] + ) { + if ([backGround isMemberOfClass:([UIImageView class])]) { + backGround.alpha = 0.0; + } + + } + } completion:^(BOOL finished) { + [UIView animateWithDuration:0.5 animations:^{ + for (UIImageView* backGround in [[[UIApplication sharedApplication] keyWindow] subviews] + ) { + if ([backGround isMemberOfClass:([UIImageView class])]) { + backGround.image = [UIImage imageNamed:@"green"]; + backGround.alpha = 1.0; + } + + } + }]; + }]; +} + - (IBAction)goBackButtonPressed { [self.navigationController popViewControllerAnimated:YES]; } diff --git a/ChangingBackground/SecondViewController.xib b/ChangingBackground/SecondViewController.xib old mode 100644 new mode 100755 index d603949..0681a89 --- a/ChangingBackground/SecondViewController.xib +++ b/ChangingBackground/SecondViewController.xib @@ -1,243 +1,41 @@ - - - - 1552 - 12C3006 - 3084 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 2083 - - - IBProxyObject - IBUIButton - IBUILabel - IBUIView - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - - - 292 - {{71, 118}, {209, 21}} - - - - _NS:9 - NO - YES - 7 - NO - IBCocoaTouchFramework - Second View Controller - - 1 - MCAwIDAAA - darkTextColor - - - 0 - - 1 - 17 - - - Helvetica - 17 - 16 - - NO - - - - 292 - {{118, 178}, {85, 44}} - - - _NS:9 - NO - IBCocoaTouchFramework - 0 - 0 - 1 - Go Back - - 3 - MQA - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - 2 - 15 - - - Helvetica-Bold - 15 - 16 - - - - {{0, 20}, {320, 548}} - - - - - 3 - MQA - - 2 - - - - - IBUIScreenMetrics - - YES - - - - - - {320, 568} - {568, 320} - - - IBCocoaTouchFramework - Retina 4 Full Screen - 2 - - IBCocoaTouchFramework - - - - - - - view - - - - 3 - - - - goBackButtonPressed - - - 7 - - 10 - - - - - - 0 - - - - - - 1 - - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 7 - - - - - - - SecondViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 10 - - - - - SecondViewController - UIViewController - - goBackButtonPressed - id - - - goBackButtonPressed - - goBackButtonPressed - id - - - - IBProjectSource - ./Classes/SecondViewController.h - - - - - 0 - IBCocoaTouchFramework - YES - 3 - 2083 - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ChangingBackground/blue.png b/ChangingBackground/blue.png old mode 100644 new mode 100755 diff --git a/ChangingBackground/blue@2x.png b/ChangingBackground/blue@2x.png old mode 100644 new mode 100755 diff --git a/ChangingBackground/en.lproj/InfoPlist.strings b/ChangingBackground/en.lproj/InfoPlist.strings old mode 100644 new mode 100755 diff --git a/ChangingBackground/green.png b/ChangingBackground/green.png old mode 100644 new mode 100755 diff --git a/ChangingBackground/green@2x.png b/ChangingBackground/green@2x.png old mode 100644 new mode 100755 diff --git a/ChangingBackground/main.m b/ChangingBackground/main.m old mode 100644 new mode 100755 diff --git a/CharlesNorthup b/CharlesNorthup new file mode 100644 index 0000000..4f2b518 --- /dev/null +++ b/CharlesNorthup @@ -0,0 +1 @@ +my code challenge diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/README_Resources/ChangingBackground.gif b/README_Resources/ChangingBackground.gif old mode 100644 new mode 100755 diff --git a/README_Resources/Dryv.gif b/README_Resources/Dryv.gif old mode 100644 new mode 100755