判断视图控制器里的viewcontrollers
NSArray *viewControllers = self.navigationController.viewControllers;
for (UIViewController *vc in viewControllers) {
if ([vc isMemberOfClass:[LevelUpViewController class]]) {
[self.navigationController popToViewController:vc animated:YES];
}
}
判断某个对象是否在一个数组中
-(BOOL)containsObject:(id)anObject;