ios系统升级到7.1后,原来在7.0下显示正常的UISearchbar现在又出现问题了。究其原因,是由于UISearchbar的subview又做修改了。

float version = [[[ UIDevice currentDevice ] systemVersion ] floatValue ];

if ([ mySearchBar respondsToSelector : @selector (barTintColor)]) {

float  iosversion7_1 = 7.1 ;

if (version >= iosversion7_1)

{

//iOS7.1

[[[[ mySearchBar . subviews objectAtIndex : 0 ] subviews ] objectAtIndex : 0 ]removeFromSuperview ];

[ mySearchBar setBackgroundColor :[ UIColor clearColor ]];

}

else

{

//iOS7.0

[ mySearchBar setBarTintColor :[ UIColor clearColor ]];

[ mySearchBar setBackgroundColor :[ UIColor clearColor ]];

}

}

else

{

//iOS7.0 以下

[[ mySearchBar . subviews objectAtIndex : 0 ] removeFromSuperview ];

[ mySearchBar setBackgroundColor :[ UIColor clearColor ]];

}

最新文章

  1. C#实现微信开发前奏
  2. 1o_Samba
  3. Python 2.7_发送简书关注的专题作者最新一篇文章及连接到邮件_20161218
  4. flex中DataGrid里使用itemRenderer后数据无法绑定到数据源的问题
  5. 使用Unity3d的Physics.Raycast()的用法做子弹射击
  6. MEF学习小结 z
  7. time.h
  8. 一个跨域请求的XSS漏洞
  9. GOPS2017全球运维大会 • 深圳站 历届金牌讲师精选亮相
  10. HDU 2485 Destroying the bus stations
  11. Linux的软件安装(JDK安装,Mysql安装,Tomcat安装)
  12. Django教程01-全流程
  13. TCP/IP 笔记 - TCP拥塞控制
  14. wamp环境搭建(apache安装,mysql安装,php安装)
  15. 【iCore1S 双核心板_ARM】例程十一:RTC实时时钟实验——显示时间和日期
  16. tensorflow 的tf.split函数的用法
  17. python 之模块之 xml.dom.minidom解析xml
  18. HDU 4705 Y (2013多校10,1010题,简单树形DP)
  19. 编码转换(UTF8->GBK)
  20. ICE新手入门版

热门文章

  1. window下手动搭建 PHP+Nginx+Mysql(转)
  2. keepalive support-----Programming applications
  3. 基于HBase0.98.13搭建HBase HA分布式集群
  4. C语言实现双向链表删除节点、插入节点、双向输出等操作
  5. How to manage and balance “Huge Data Load” for Big Kafka Clusters---reference
  6. apache服务器php程序
  7. android之Java+html+javascript混合开发
  8. 在iis中mantisbt配置过程
  9. Pagekit安装
  10. .NET生成PDF文件