您的位置:首页 > 移动开发 > IOS开发

IOS笔记 搜索框

2013-05-28 13:53 88 查看
//搜索

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;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: