Getting Index of an Object from NSArray?

后端 未结 7 1500
没有蜡笔的小新
没有蜡笔的小新 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:09

    If you're using Swift and optionals make sure they are unwrapped. You cannot search the index of objects that are optionals.

提交回复
热议问题