From e5fa4de1005a9790cae8779437a5085a6b30d73c Mon Sep 17 00:00:00 2001 From: "E. Maloney" Date: Fri, 1 May 2015 02:00:08 -0700 Subject: [PATCH] change where the delegate property is set in the current implementation, the very first content view controller's delegate property will not be set when its viewWillAppear: method is called. --- Objective-C/Onboard/OnboardingViewController.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Objective-C/Onboard/OnboardingViewController.m b/Objective-C/Onboard/OnboardingViewController.m index 43ad104..23cc0ae 100644 --- a/Objective-C/Onboard/OnboardingViewController.m +++ b/Objective-C/Onboard/OnboardingViewController.m @@ -144,7 +144,13 @@ - (void)generateView { backgroundMaskView.backgroundColor = [UIColor colorWithWhite:0.0 alpha:kBackgroundMaskAlpha]; [_pageVC.view addSubview:backgroundMaskView]; } - + + // set ourself as the delegate on all of the content views, to handle fading + // and auto-navigation + for (OnboardingContentViewController *contentVC in self.viewControllers) { + contentVC.delegate = self; + } + // set the initial current page as the first page provided _currentPage = [self.viewControllers firstObject]; @@ -198,12 +204,6 @@ - (void)generateView { } } } - - // set ourself as the delegate on all of the content views, to handle fading - // and auto-navigation - for (OnboardingContentViewController *contentVC in self.viewControllers) { - contentVC.delegate = self; - } } - (void)handleAppEnteredForeground {