//搜索
UISearchBar *searchBarCustom = [[UISearchBaralloc] initWithFrame:CGRectMake(834,10 ,180,24)];
searchBarCustom.backgroundColor = [UIColorclearColor]; //修改搜索框背景
searchBarCustom.delegate=self;
searchBarCustom.placeholder=@"会员卡号";
[[searchBarCustom.subviewsobjectAtIndex:0]removeFromSuperview]; //去掉搜索框背景
for (UIView *subview in searchBarCustom.subviews) {
if ([subviewisKindOfClass:NSClassFromString(@"UISearchBarBackground")]) {
[subviewremoveFromSuperview];
break;
}
}