NSArray * viewControllers =self.navigationController.viewControllers;
if (viewControllers.count>1 && [viewControllers objectAtIndex:viewControllers.count-2] ==self) {
NSLog(@"push");
}else if ([viewControllers indexOfObject:self]==NSNotFound){
NSLog(@"pop");
}
网友评论