更新时间:2023-02-21 16:08:42
BOOL isTheObjectThere = [myArray containsObject: @"my string"];
或者如果您需要知道它在哪里
or if you need to know where it is
NSUInteger indexOfTheObject = [myArray indexOfObject: @"my string"];
我强烈建议您阅读 关于 NSArray 的文档.***在发布您的问题之前这样做:-)
I strongly recommend you read the documentation on NSArray. It's best to do that before posting your question :-)