美文网首页
UISearchBar中更改UITextField的clearB

UISearchBar中更改UITextField的clearB

作者: Django_Monstar | 来源:发表于2016-06-02 10:39 被阅读143次
    
    for (UIView* view in mySearchbar.subviews)
        {
            for (UIView *v in view.subviews) {
                if ( [v isKindOfClass: [UITextField class]] )
                {
                    UITextField *tf = (UITextField *)v;
                    tf.clearButtonMode = UITextFieldViewModeNever;
                }
            }
        }
    

    相关文章

      网友评论

          本文标题:UISearchBar中更改UITextField的clearB

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