Sangram Anand Sangram Anand - 9 months ago 42
iOS Question

Passing parameters in self action:@selector

I am trying to add a NSIndexpath as parameter to a method through

[self action:@selector(showDetailedImage)];

Is it possible to add an extra parameter(
) to this method?


No, you can not pass arguments, you can only show that this selector will take that many numbers of arguments.

If you need to do this, you can create a property and access it from the method showDetailedImage.

However you can use this selector:

[self performSelector:@selector(showDetailedImageIndex:) withObject:objectOfNSIndex];