Reputation: 1738
I am trying to add a few UIButtons to a collectionviews header, but am having difficulties discovering which header is pressed. Any suggestions?
Upvotes: 0
Views: 245
Reputation: 5845
If you are adding the UIButtons
programmatically the fastest is to add a tag with the section to the button.
UIButton.tag = x //where x is the section number
Then in the action you can check the tag.
Upvotes: 2