//直接上代码
CGRect rect = CGRectMake(0,0, self.view.frame.size.width,self.view.frame.size.height);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context =UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [[UIColorclearColor] CGColor]);
CGContextFillRect(context, rect);
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[self.tabBarsetBackgroundImage:img];
[self.tabBarsetShadowImage:img];
本文介绍了一种使用Objective-C代码清除iOS应用中TabBar背景和阴影的方法。通过创建一个与TabBar大小相匹配的透明图像,并将其设置为背景和阴影图片,从而实现了去除TabBar默认样式的效果。
5543

被折叠的 条评论
为什么被折叠?



