默认样式 | | |
barTintColor | | .searchBar.barTintColor = [UIColor orangeColor] |
backgroundImage | | .backgroundImage = [[UIImage alloc] init]; 变为透明背景 |
backgroundColor(单独不起作用) | | searchBar.backgroundImage = [[UIImage alloc] init];searchBar.backgroundColor = [UIColor whiteColor]; |
内置的textFeild,可用kvc设置 | | UITextField *tf = [searchBar valueForKey:@"_searchField"]; tf.backgroundColor = [UIColor redColor] |
隐藏边缘的黑线 | sb.layer.borderWidth = 1; sb.layer.borderColor = [[UIColor whiteColor] CGColor]; | |