修改tabbar的透明度

2021-01-16 09:48:05

如何修改tabbar的透明度

#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;}



  • 2020-12-01 16:10:12

    IntelliJ IDEA之代理配置 anyproxy

    网络号,真是太爽了,真的,如果又了好的网络,开发真是事半功倍,所以,大家开发前,一定要把自己的网络给整好。 会给你节省不少时间呢。

  • 2020-12-01 16:14:54

    HTTP状态码429的含义

    发生429是服务器接口并发太多引起的,可根据代码进行修改,放开限制次数

  • 2020-12-01 16:19:26

    vue中动画分布解析

    enter, enter-active, enter-active-to, (开始 进入阶段的)第1帧 属性值,到 (默认属性值 的过渡阶段),移除enter动画, leave, leave-active, leave-active-to (开始 离开 阶段的)第1帧 默认属性值,到 (属性值 的过渡阶段),移除leave动画

  • 2020-12-01 16:21:47

    Meteor与express结合开发

    Meteor本质上是一个已经公开了连接 http服务器的节点应用程序,这意味着您可以像下面这样定义服务器路由:,如果您坚持使用Express,则可以将Express路由注册为Connect中间件,如下所示:

  • 2020-12-01 16:25:32

    nuxtjs引入jquery

    nuxt引入jQuery库 nuxtjs如何添加 Webpack 插件?

  • 2020-12-01 16:43:37

    fieldset标签做输入框

    比如 vuetify中的 input组件,就用到了fieldset做边框, 这个时候我们想改边框,却找不到border,因为fieldset是靠color来修改边框颜色的。