开发者

How to identify buttons click event which is on the custom cell?

开发者 https://www.devze.com 2023-01-11 05:13 出处:网络
I have custom cell which contains numbe开发者_如何学Gor of rows in it.i want to write it\'s Action(click event) so how should i identify which buttons clicked and how can i write it\'s click event for

I have custom cell which contains numbe开发者_如何学Gor of rows in it.i want to write it's Action(click event) so how should i identify which buttons clicked and how can i write it's click event for it.Please give me some guidelines for that.i have not implemented yet.


Use the tag property of the button.

When you make the button, say:

button.tag = indexPath.row.

Then, on the action, you can pull that tag, which will be unique, and act accordingly.

0

精彩评论

暂无评论...
验证码 换一张
取 消