判斷視圖控制器里的viewcontrollers
NSArray *viewControllers = self.navigationController.viewControllers;
for (UIViewController *vc in viewControllers) {
if ([vc isMemberOfClass:[LevelUpViewController class]]) {
[self.navigationController popToViewController:vc animated:YES];
}
}
判斷某個(gè)對(duì)象是否在一個(gè)數(shù)組中
-(BOOL)containsObject:(id)anObject;