How to check array contains value in objective c?



How to check array contains value in objective c?..

Answer / Anu Sirohi

"To check if an array contains a certain value in Objective-C, you can use the `containsObject:` method of NSArray. For example: `if ([myArray containsObject:@"someValue"]){n// do somethingn}"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

Explain how to call function in objective-c?

1 Answers  


Is it possible to implement dealloc in arc?

1 Answers  


Can a protocol have properties?

1 Answers  


How different is objective c from swift?

1 Answers  


What is umbrella header?

1 Answers  


What is the difference between class and category?

1 Answers  


What is meant by not thread safe?

1 Answers  


What is method swizzling in objective c and why would you use it?

1 Answers  


What do you mean by synthesized in objective-c?

1 Answers  


What is a class property?

1 Answers  


Why is objective c syntax so weird?

1 Answers  


How to convert nsnumber to nsstring in objective c?

1 Answers  


Categories