别说话,直接上代码
for (id obj in [searchBar subviews]) {
if ([obj isKindOfClass:[UIView class]]) {
for (id obj2 in [obj subviews]) {
if ([obj2 isKindOfClass:[UIButton class]]) {
UIButton *btn = (UIButton *)obj2;
[btn setTitle:@"取消" forState:UIControlStateNormal];
}
}
}
}
时间: 2024-10-21 08:32:35