美文网首页
[iOS] UISearchBar cancel 改为 取消

[iOS] UISearchBar cancel 改为 取消

作者: 世上无南西 | 来源:发表于2018-12-29 17:06 被阅读0次

for(UIView *view in  [[[searchBar subviews] objectAtIndex:0] subviews]) {

        if([view isKindOfClass:[NSClassFromString(@"UINavigationButton") class]]) {

            UIButton * cancel =(UIButton *)view;

            [cancel setTitle:@"取消" forState:UIControlStateNormal];

        }

    }

相关文章

网友评论

      本文标题:[iOS] UISearchBar cancel 改为 取消

      本文链接:https://www.haomeiwen.com/subject/nedplqtx.html