如何将UISearchBar上"Cancel"按钮改为”取消“?

别说话,直接上代码

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];
                }
            }
        }
   }

上一篇:Python基础之流程控制for循环


下一篇:Python基础之流程控制while循环