去掉搜索框的放大镜
2015-07-26 本文已影响195人
Pierre_
UITextField *txfSearchField = [self valueForKey:@"_searchField"]; [txfSearchField setBackgroundColor:[UIColor whiteColor]]; [txfSearchField setLeftViewMode:UITextFieldViewModeNever]; [txfSearchField setRightViewMode:UITextFieldViewModeNever]; [txfSearchField setBackground:[UIImage imageNamed:@""]]; [txfSearchField setBorderStyle:UITextBorderStyleNone]; //txfSearchField.layer.borderWidth = 8.0f; //txfSearchField.layer.cornerRadius = 10.0f; txfSearchField.layer.borderColor = [UIColor clearColor].CGColor; txfSearchField.clearButtonMode=UITextFieldViewModeNever;}