直接上图:
灰色边框着实难看,设置一下searchBar的barTintColor:
_searchBar.barTintColor = [UIColor clearColor];
毫无用处!
再设置一下backgroundImage属性,backgroundImage有如下描述:
// 1pt wide images and resizable images will be scaled or tiled according to the resizable area, otherwise the image will be tiled
@property(nonatomic,retain) UIImage *backgroundImage NS_AVAILABLE_IOS(5_0) UI_APPEAR