The NSArray
method insertObject:atIndex
does not accept nil
. If you do want to insert a nil
object into an array, or rather, a representation of a nil
entry, use [NSNull null]
, so you have:
[myArray insertObject[NSNull null] atIndex:myIndex]
In your case, however, probably the root cause of the error is that self.slidingViewController.panGesture
is nil
.