@selector(updateStuff:)
This is automatically sends the parameter :(id)sender. Is it possible to override this to be something else? In my particular usage, the actual sender is meaningless.
I'm using a UITableView and setting a UISwitch in the UIAccessoryView slot on every cell. Originally, I was adding the UISwitch to the UIAccessoryView outside of the the cell initialization, which allowed each UISwitch to be a unique instance. However this creates a noticeable lag while scrolling down long list on the iPhone 3G. If I add the UIAccessoryView to the cell when it's initialized, it can be dequeued instead of instantiated and eases the lag considerably. Unfortunately, the cost of doing this is, the instance is NOT unique to each UISwitch in the table, and :(id)sender becomes meaningless.
I need one of two things...
I can always resort to adding the UISwitch after the cell is created/dequeued but it is terribly slow and inefficient. Thanks for any help.
Sincerely, Z@K!
I had a similar problem, the way I've solved it is by setting the "tag" property of the sender, every view has this property and purpose is to help identify it. So while creating/dequeueing the cell set the tag to identify the cell, and on the action use [sender tag] to get the context of the click