collectionview 里有多个section 多个cell 如何知道点击的是哪个section里的哪个row里的button???????
想选择button改变选中的button的颜色
阿神2017-04-17 17:35:09
The easiest way is to directly change the button color according to the button's tag, without looking for section, row.
UIButton btn = (UIButton )[self.view viewWithTag:564684];
PHP中文网2017-04-17 17:35:09
If you just want to change the color of the selected button, wouldn’t it be better to modify the sender directly? .
巴扎黑2017-04-17 17:35:09
Customize a UIButton and add attributes to the button, such as:
@property (nonatomic) NSInteger section;
@property (nonatomic) NSInteger row;
Then assign value in cellForRowAtIndexPath: