I am using below code to check ary_navigationControllerViews array contains myclass object or not its working fine but i need with out for loop.I know we have method like containsObject but how to use in this situation. Is there any way to check this condition with out using for loop.
NSArray *ary_navigationControllerViews = [[NSArray alloc] initWithArray:[self.navigationController viewControllers]];
for(id obj_viewController in ary_navigationControllerViews) {
if([obj_viewController isKindOfClass:[myClass class]]) {
//some my code
return;
}
}