TranslucentToolbar.h文件

#import <UIKit/UIKit.h>

@interface TranslucentToolbar :
UIToolbar

@end

TranslucentToolbar.m文件

#import "TranslucentToolbar.h"

@implementation TranslucentToolbar

- (id)initWithFrame:(CGRect)aRect {

if ((self = [super
initWithFrame:aRect])) {

self.opaque =
NO;

self.backgroundColor = [UIColor
colorWithRed:34.0/255.0
green:39.0/255.0
blue:42.0/255.0
alpha:0.8];

self.clearsContextBeforeDrawing =
YES;

}

return
self;

}

- (void)drawRect:(CGRect)rect

{

// Drawing code

}

@end

在须要创建的地方使用子类化的UIToolbar:

_bottomBar =[[TranslucentToolbar
alloc] initWithFrame:CGRectMake(0, height-botH, width, botH)];

最新文章

  1. 《DSP using MATLAB》第6章开始了
  2. Android课程---优化ListView列表视图
  3. 基于注解的Spring AOP的配置和使用--转载
  4. CentOS yum安装和配置MySQL(转载)
  5. Bootstrap_Javascript_固定定位
  6. rest-简介
  7. unix您不能使用crontab设置运营计划
  8. bootstrap switch功能
  9. input和textarea标签的select()方法----选中文本框中的所有文本
  10. linux服务端日志中截取自己所需要的部分
  11. 线段树(segment_tree)
  12. participation remain wide
  13. [转]RPA简介
  14. Redis重大版本
  15. extjs model store学习笔记
  16. C高级第二次PTA作业
  17. Java内存模型与共享变量可见性
  18. SpringBoot中Mybatis打印sql
  19. 【cs229-Lecture8】顺序最小优化算法
  20. 学hadoop需要什么基础

热门文章

  1. jsp界面项目绝对路径问题
  2. Microsoft Azure云计算第一步—试用帐户申请
  3. 基于MapReduce的关系代数运算(2)
  4. Systemd Unit文件中PrivateTmp字段详解-Jason.Zhi
  5. 根据headerView位置改变headerView颜色(collectionView/tableview)
  6. hdu4135-Co-prime &amp; Codeforces 547C Mike and Foam (容斥原理)
  7. (翻译)异步编程之Promise(1):初见魅力
  8. 根据路径获得文件名以及Aspose.Cells.dll操作excel 以及使用iTextSharp.text.pdf.PdfReader.dll对PDF的操作
  9. xiaocms 关于搜索功能 添加搜索字段
  10. ASP.NET MVC- 解决HTML转码