//搜索框背景
_searchTextField.backgroundColor=kColorFromRGB((0x456C91));
_searchTextField.placeholder=@"请输入搜索内容";
//背景提示字的颜色,字体
[_searchTextField setValue:kColorFromRGB((0x7D98B2)) forKeyPath:@"_placeholderLabel.textColor"];
[_searchTextField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];
//搜索图
UIImageView *searchP=[[UIImageView alloc]initWithFrame:CGRectMake(2, 6, 33, 33)];
searchP.image=[UIImage imageNamed:@"searchT"];
_searchTextField.leftView=searchP;
_searchTextField.leftViewMode=UITextFieldViewModeAlways;
_searchTextField.contentVerticalAlignment=UIControlContentVerticalAlignmentCenter;
/////==========================
注意:上面的提示字的颜色设置在13版本系统后会报错,APP用到了会闪退,大家可以搜搜相关内容