I’m trying to send an ActionSheet a variable from a button.
I can’t use the tag property because its being used for something else.
I’ve declared myIndexRow as an instance variable and have:
NSInteger myIndexRow = indexPath.row;
[deleteButton addTarget:self action:@selector(showDeleteSheet:) forControlEvents:UIControlEventTouchUpInside];
deleteButton.myIndexRow = myIndexRow;
but I’m getting the ‘Request for member ‘myRow’ is something not a structure or union’
There is something obvious I am missing here.
Never figured I’d answer my own question on SO but here goes:
Accessing the superview’s superview and querying the indexPath section and row properties did the trick.
In the target of the button:
Then down in the actionSheet’s clickedButtonAtIndex method I get the row I need:
Part of the answer was found in another post and and the rest here