Array, find the object with the value and get its indexPath

I am trying to find an element in NSMutableArray

from its value, only to find its indexPath.

I have absolutely no idea how to do this as I am very new to programming in general.

Thanks!

+2


a source to share


2 answers


Are you looking for - indexOfObject:

? This method returns the index at which the specified object can be found in NSArray

(from which it inherits from NSMutableArray

) this method is executed.



+3


a source


You probably need something like this or this



0


a source







All Articles