开发者

how can i get object from tag?

开发者 https://www.devze.com 2023-02-06 09:58 出处:网络
i have one view .in th开发者_StackOverflow社区at view i have 2 buttons . i know tag of that button . i want to change image of that button.

i have one view .in th开发者_StackOverflow社区at view i have 2 buttons .

i know tag of that button . i want to change image of that button.

how can i change image by this tag?


UIButton *button = (UIButton *)[myView viewWithTag:myTag];
[button setImage:... forState:...];


UIScrollView * scView=(UIScrollView*)[self.view viewWithTag:20];
UIButton *button = (UIButton *)[scView viewWithTag:3];
0

精彩评论

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

关注公众号