#pragma mark ========= 修改tabbar 的高度
- (void)viewDidLayoutSubviews{
// NSLog(@"%lf, %lf, %lf, %lf,", self.tabBar.frame.origin.x, self.tabBar.frame.origin.y, self.tabBar.frame.size.width, self.tabBar.frame.size.height);
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
CGRect frame = CGRectMake(0, self.tabBar.frame.origin.y-41, self.tabBar.frame.size.width, 90);
self.tabBar.frame = frame;
});
// self.tabBar.backgroundColor = [UIColor clearColor];
self.tabBar.backgroundImage = [self imageWithColor:[UIColor colorWithRed:1 green:1 blue:1 alpha:0]];
}
- (UIImage *)imageWithColor:(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 *image =UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
tabbar 透明度
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 本节前言 今天给大家介绍的是关于Android各式各样的透明度,有需要的希望能够帮到你们 我们在学习本节课之前,先...
- 记录颜色十六进制透明度100% — FF99% — FC98% — FA97% — F796% — F595% —...