去掉搜索框的放大镜

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

你可能感兴趣的:(去掉搜索框的放大镜)