gpt4 book ai didi

ios - 我如何获得 UIButton 指针?

转载 作者:行者123 更新时间:2023-11-28 18:32:44 25 4
gpt4 key购买 nike

如何从使用标签创建的按钮获取 UIButton 指针?

int buttonTagIndex = button.tag;

最佳答案

这就是我在 UIViewController 中使用的方法。

UIButton *btn = (UIButton *) [self.view viewWithTag:index];

关于ios - 我如何获得 UIButton 指针?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25066662/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com