如何遍历View上所有的UIButton?

2025-03-06 11:23:00
推荐回答(1个)
回答1:

for (id obj in self.view.subviews) {if ([obj isKindOfClass:[UIButton Class]]) {UIButton* theButton = (UIButton*)obj;theButton.xxx = ooo;}}