diff --git a/Pods/Onboard/Source/OnboardingViewController.h b/Pods/Onboard/Source/OnboardingViewController.h index 2f73d6780f646137e125c7a706f3d93e2bfdde72..0d2c3851d3a1bc5cb03f8e0666855093ec578965 100644 --- a/Pods/Onboard/Source/OnboardingViewController.h +++ b/Pods/Onboard/Source/OnboardingViewController.h @@ -24,6 +24,11 @@ @property (nonatomic, strong) UIImage *backgroundImage; +/** + * @brief The background imageView presented. if a backgroundimage is shown. + */ +@property (nonatomic) UIImageView *backgroundImageView; + /** * @brief Determines whether or not the background will be masked. The default value of this property is YES. */ @@ -135,4 +140,6 @@ */ - (void)moveNextPage; +- (void)fadeBackground:(UIImage *) newImage; + @end diff --git a/Pods/Onboard/Source/OnboardingViewController.m b/Pods/Onboard/Source/OnboardingViewController.m index 1c50a98e5a75546c2b01e458244c612fafebd51c..dc3c3269cd6c058dc7d3621f98336ede694ac2e1 100644 --- a/Pods/Onboard/Source/OnboardingViewController.m +++ b/Pods/Onboard/Source/OnboardingViewController.m @@ -52,6 +52,9 @@ static NSString * const kSkipButtonText = @"Skip"; return nil; } + //self.view.backgroundColor = UIColor.whiteColor; + //self.backgroundImageViewl = [[UIImageView alloc] initWithFrame:self.view.bounds]; + self.backgroundImage = backgroundImage; return self; @@ -90,7 +93,7 @@ static NSString * const kSkipButtonText = @"Skip"; self.viewControllers = contents; // Set the default properties - self.shouldMaskBackground = YES; + self.shouldMaskBackground = NO;//YES; self.shouldBlurBackground = NO; self.shouldFadeTransitions = NO; self.fadePageControlOnLastPage = NO; @@ -162,15 +165,16 @@ static NSString * const kSkipButtonText = @"Skip"; [self blurBackground]; } - UIImageView *backgroundImageView; + self.backgroundImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; + //UIImageView *backgroundImageView = self.backgroundImageViewl; // create the background image view and set it to aspect fill so it isn't skewed if (self.backgroundImage) { - backgroundImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; - backgroundImageView.clipsToBounds = YES; - backgroundImageView.contentMode = UIViewContentModeScaleAspectFill; - [backgroundImageView setImage:self.backgroundImage]; - [self.view addSubview:backgroundImageView]; + self.backgroundImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; + self.backgroundImageView.clipsToBounds = YES; + self.backgroundImageView.contentMode = UIViewContentModeScaleAspectFill; + [self.backgroundImageView setImage:self.backgroundImage]; + //[self.view addSubview:self.backgroundImageView]; } // as long as the shouldMaskBackground setting hasn't been set to NO, we want to @@ -201,8 +205,8 @@ static NSString * const kSkipButtonText = @"Skip"; [self.pageVC.view sendSubviewToBack:backgroundMaskView]; // send the background image view to the back if we have one - if (backgroundImageView) { - [self.pageVC.view sendSubviewToBack:backgroundImageView]; + if (self.backgroundImageView) { + [self.pageVC.view sendSubviewToBack:self.backgroundImageView]; } // otherwise send the video view to the back if we have one @@ -501,4 +505,41 @@ static NSString * const kSkipButtonText = @"Skip"; self.backgroundImage = outputImage; } +- (void) fadeBackground:(UIImage *)newImage { + + self.backgroundImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; + //UIImageView *backgroundImageView = self.backgroundImageViewl; + + // create the background image view and set it to aspect fill so it isn't skewed + if (self.backgroundImage) { + self.backgroundImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; + self.backgroundImageView.clipsToBounds = YES; + self.backgroundImageView.contentMode = UIViewContentModeScaleAspectFill; + [self.backgroundImageView setImage:self.backgroundImage]; + [self.view addSubview:self.backgroundImageView]; + } + + UIImageView *oldImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; + [oldImageView setImage:self.backgroundImage]; + UIImageView * newImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; + [newImageView setImage:newImage]; + newImageView.alpha = 0; + oldImageView.clipsToBounds = YES; + oldImageView.contentMode = UIViewContentModeScaleAspectFill; + newImageView.clipsToBounds = YES; + newImageView.contentMode = UIViewContentModeScaleAspectFill; + [self.view insertSubview: newImageView aboveSubview: self.backgroundImageView]; + [self.view insertSubview: oldImageView aboveSubview: newImageView]; + [UIView animateWithDuration: 10.0 delay: 0.0 options: UIViewAnimationOptionCurveEaseInOut animations: ^{ + oldImageView.alpha = 0; + newImageView.alpha = 1; + } completion: ^(BOOL completed){ + self.backgroundImageView.image = newImage; + self.backgroundImage = newImage; + [newImageView removeFromSuperview]; + [oldImageView removeFromSuperview]; + [self.view setNeedsDisplay]; + }]; +} + @end diff --git a/enzevalos_iphone.xcworkspace/xcuserdata/jakobsbode.xcuserdatad/UserInterfaceState.xcuserstate b/enzevalos_iphone.xcworkspace/xcuserdata/jakobsbode.xcuserdatad/UserInterfaceState.xcuserstate index e41ca7ac80948693160c688cae5f0b0b9760de04..2858f755404db9f82e42d25c01a25812f8c14cb5 100644 Binary files a/enzevalos_iphone.xcworkspace/xcuserdata/jakobsbode.xcuserdatad/UserInterfaceState.xcuserstate and b/enzevalos_iphone.xcworkspace/xcuserdata/jakobsbode.xcuserdatad/UserInterfaceState.xcuserstate differ