UISearchBar在uinavigationbar上显示-ios7
来源:互联网 发布:淘宝可以同城交易吗 编辑:程序博客网 时间:2024/05/21 17:29
1,malloc searchbar,and add it to navbar
mSearchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, SearchBar_W, SearchBar_H)];
[self setSearchBarBgColor];
mSearchBar.delegate = self;
mSearchBar.placeholder = @"搜索";
self.navigationItem.titleView = mSearchBar;
[mSearchBar release];
2, add fun ->setSearchBarBgColor
mSearchBar.backgroundColor = [UIColor clearColor];
if (IOS7)
{
if ([[mSearchBar subviews] count] > 0)
{
UIView * thesuperview = [[mSearchBar subviews] objectAtIndex:0];
NSArray *viewSubvies = [thesuperview subviews];
for (UIView *_theview in viewSubvies)
{
if ([_theview isKindOfClass:[UITextField class]])
{
}
if ([_theview isKindOfClass:NSClassFromString(@"UISearchBarBackground")])
{
[_theview removeFromSuperview];//去掉背景,否searchbar则会闪一下灰色背景
}
}
}
mSearchBar.tintColor = [UIColor myColor];//光标颜色
}
- UISearchBar在uinavigationbar上显示-ios7
- 在ios7及以上系统中在UINavigationBar中添加UITextField或者UISearchbar时不显示输入光杆问题及解决
- Collectionview在iOS7上不显示
- UISearchDisplayController 与 UISearchBar 在IOS7的问题
- ios7 UISearchBar
- 自定义UINavigationBar和UISearchBar
- 在NavigtionBar上设置 UISearchBar
- 自定义的UIAlertView不能在iOS7上正常显示
- 自定义的UIAlertView不能在iOS7上正常显示
- 自定义的UIAlertView不能在iOS7上正常显示
- RFSegmentView在iOS7设备上不显示label的解决方案
- 适配iOS7 — UISearchBar
- ios7 uinavigationbar下面的黑线
- iOS7.1 UISearchBar 去掉黑线..
- iOS7下 UISearchBar设置ReturnKeyType
- iOS7.1 UISearchBar 去掉黑线..
- ios7上UISearchBar和UITableView下拉刷新的时候阴影解决
- IOS 7 自定义的UIAlertView不能在iOS7上正常显示
- thinkphp 合并两个字段组合成一个临时字段concat函数
- php读取mysql的简单实例
- 学习效率金字塔偶感
- 如何用C#为SQL Server数据库创建一个新表?
- 设置Activity对应屏幕标题的图标
- UISearchBar在uinavigationbar上显示-ios7
- 8051定时器的使用
- C/C++网络编程总结与ZeroMQ
- SQL优化:索引,explain
- 循环展开技术
- svg js
- java.sql.Clob 转化为String的方法
- javascript面向对象编程(六)
- Linux内核的同步机制——有DEFINE_SPINLOCK()