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;
}
}
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;
}
}
相关文章推荐
- WWDC 2014 Session笔记 - iOS 通知中心扩展制作入门
- IOS学习笔记38——NSJSONSerialization使用
- iOS学习笔记45—本地通知UILocalNotification
- 【代码笔记】iOS-手机验证码
- IOS开发笔记之六——ios 8地图定位服务问题
- NT_iOS笔记—Xcode6上UIWebView的JS(location.href)无效的问题
- iOS画图的一些笔记CGContextRef
- iOS中UISearchBar(搜索框)使用总结
- iOS阶段学习第26天笔记(UILabel的介绍)
- iOS开发 - 使用UISearchController跳转新控制器时搜索框依然出现
- ios开发笔记之 内存警告问题
- 黑马程序员-IOS笔记-和新语法
- iOS学习笔记-APP之间数据共享空间_APPGroup
- iOS学习笔记之UITableView之右侧索引
- ios笔记-NSSet
- iOS陆哥开发笔记(十四) (Quartz2D简单介绍)
- IOS学习笔记之关键词@dynamic
- 《iOS开发笔记—UICollectionView》
- iOS学习笔记-008.猜图(完整)