Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个嵌套NSArray
NSArray
int row = [myarray indexOfObject:module];
并且该indexOfObject方法返回错误的结果。任何想法?
indexOfObject
这通常发生在对象module或其中一个对象NSArray没有isEqual:正确实现该方法时。确保那个module类有这个方法
module
isEqual:
- (BOOL)isEqual:(id)anObject { ... }
YES当此对象等于 时,该方法返回,否则anObject返回。NO
YES
anObject
NO