永发信息网

ios开发iphone x底部粗黑线怎么隐藏

答案:3  悬赏:80  手机版
解决时间 2021-03-31 20:59
  • 提问者网友:骨子里的高雅
  • 2021-03-31 16:32
ios开发iphone x底部粗黑线怎么隐藏
最佳答案
  • 五星知识达人网友:英雄的欲望
  • 2021-03-31 16:55
代码:
CGRect rect = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width);

UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [[UIColor clearColor] CGColor]);
CGContextFillRect(context, rect);
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[tabbar.tabBar setBackgroundImage:img];
[tabbar.tabBar setShadowImage:img];
[tabbar.tabBar setBackgroundColor:[UIColor whiteColor]];(如果不加上这行代码,你的tabbar的颜色是透明的.如果你是自定义的背景视图,可以在上方的setBackgroundImage添加你自定义的图片)
全部回答
  • 1楼网友:夜余生
  • 2021-03-31 18:04
越狱的话,应该可以达到
  • 2楼网友:渊鱼
  • 2021-03-31 17:43
换台iPhone8
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯