Getting Index of an Object from NSArray?

后端 未结 7 1491
没有蜡笔的小新
没有蜡笔的小新 2020-12-12 23:17

i am trying to get index of an array through indexOfObject method as follows but when i try to log the value to test the index i get a garbage value.. for t

7条回答
  •  南方客
    南方客 (楼主)
    2020-12-13 00:01

    Try this:

    NSArray's indexOfObject: method. Such as the following:

    NSUInteger fooIndex = [someArray indexOfObject: someObject];
    

提交回复
热议问题