Skip to content

Commit

Permalink
change where the delegate property is set
Browse files Browse the repository at this point in the history
in the current implementation, the very first content view controller's
delegate property will not be set when its viewWillAppear: method
is called.
  • Loading branch information
emaloney committed May 1, 2015
1 parent 5ddde1f commit e5fa4de
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Objective-C/Onboard/OnboardingViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit e5fa4de

Please sign in to comment.