去掉tabbar的边框线
2015-11-21 09:31
302 查看
转载自:http://www.shangxueba.com/jingyan/2453883.html
- (void)viewWillAppear:(BOOL)animated{//去掉UITabbar的边框线
[self.tabBarController.tabBar setBackgroundImage:[Utill createImageWithColor:[UIColor clearColor]]];
[self.tabBarController.tabBar setShadowImage:[Utill createImageWithColor:[UIColor clearColor]]];
}
转载自:http://blog.csdn.net/hengshujiyi/article/details/22855811
- (UIImage*) createImageWithColor: (UIColor*) color
{
CGRect rect=CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [color CGColor]);
CGContextFillRect(context, rect);
UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return theImage;
}
- (void)viewWillAppear:(BOOL)animated{//去掉UITabbar的边框线
[self.tabBarController.tabBar setBackgroundImage:[Utill createImageWithColor:[UIColor clearColor]]];
[self.tabBarController.tabBar setShadowImage:[Utill createImageWithColor:[UIColor clearColor]]];
}
转载自:http://blog.csdn.net/hengshujiyi/article/details/22855811
- (UIImage*) createImageWithColor: (UIColor*) color
{
CGRect rect=CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [color CGColor]);
CGContextFillRect(context, rect);
UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return theImage;
}
相关文章推荐
- 【HNOI2006】【BZOJ1193】马步距离
- 引导加载程序之争: LILO 和 GRUB
- 宏的使用及细节注意
- 引导加载程序之争: LILO 和 GRUB
- 引导加载程序之争: LILO 和 GRUB
- 常用的生成客户端脚本方法
- 引导加载程序之争: LILO 和 GRUB
- 用mdf文件和ldf文件恢复数据库
- ZBarReaderView 使用 设定扫描范围 整理 转载
- linux 中的stray ‘\241’ in program错误
- javaWEB实现相册管理的简单功能
- 百度地图demo-不显示地图
- 深入贯彻落实 Activity 的四种启动模式
- 根据输入显示一个人的出生日期(我的第二个python程序)
- 简单了解Java编程中线程的创建与守护线程
- You must restart adb and Eclipse的情况之一
- Android SDK Manager更新
- 对ORACLE的一些闪回和触发器操作,和备份
- ubuntu 查看软件包版本以及软件包的源码
- Asp.net 在刷新或提交页面后保持滚动条的位置