修改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;}



  • 2017-01-23 23:09:16

    使用 CSS3 实现超炫的 Loading(加载)动画效果

     SpinKit 是一套网页动画效果,包含8种基于 CSS3 实现的很炫的加载动画。借助 CSS3 Animation 的强大功能来创建平滑,易于定制的动画。SpinKit 的目标不是提供一个每个浏览器都兼容的解决方案,而是给现代浏览器提供更优的技术实现方案和更佳的使用体验。(为保证最佳的效果,请在 Chrome、Firefox 和 Safari 等现代浏览器中浏览)