How to check contains of object in one array in objective C iOS
Solution:
NSArray *arr = @[@1,@2,@3];
int value = 1;
if([arr contains:value]) {
NSlog("yes it's Available");
} else {
NSlog("not Available");
}
Solution:
NSArray *arr = @[@1,@2,@3];
int value = 1;
if([arr contains:value]) {
NSlog("yes it's Available");
} else {
NSlog("not Available");
Comments
Post a Comment