ipup / PPRevealSideViewController

A new container controller to easily push views on side like Path or Facebook
www.ipup.pro
Other
821 stars 194 forks source link

viewWillAppear called twice #102

Closed haifengkao closed 9 years ago

haifengkao commented 10 years ago

Why does PPRevealSideViewController invoke viewWillAppear of its child view controllers?

It makes viewWillAppear unnecessarily called twice (another is from the UIKit).

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    if (!PPSystemVersionGreaterOrEqualThan(5.0)) [_rootViewController viewWillAppear:animated];

    PPRevealSideDirection direction = [self getSideToClose];
    if (direction != PPRevealSideDirectionNone) [[_viewControllers objectForKey:[NSNumber numberWithInt:direction]] viewWillAppear:animated];
}
ipodishima commented 9 years ago

This is just for < iOS 5.

Will clean the support for this