Skip to content

Commit

Permalink
Fixed #59 #60 navigationItem.titleView is not loaded on iOS 8.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-lyn committed Apr 14, 2016
1 parent 88b6f8b commit 8812b7d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions STPopup/STPopupController.m
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,16 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
{
UIViewController *topViewController = self.topViewController;
if (object == _navigationBar || object == topViewController.navigationItem) {
[self updateNavigationBarAniamted:NO];
if (topViewController.isViewLoaded && topViewController.view.superview) {
[self updateNavigationBarAniamted:NO];
}
}
else if (object == topViewController && topViewController.isViewLoaded && topViewController.view.superview) {
[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:1 initialSpringVelocity:0 options:UIViewAnimationOptionCurveEaseOut
animations:^{
[self layoutContainerView];
} completion:nil];
else if (object == topViewController) {
if (topViewController.isViewLoaded && topViewController.view.superview) {
[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:1 initialSpringVelocity:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
[self layoutContainerView];
} completion:nil];
}
}
}

Expand Down

0 comments on commit 8812b7d

Please sign in to comment.