视频直播app源码,去掉导航条和tabbar线条
去掉导航条底部线条
[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]];
去掉tabbar顶部线条
// tabbar里面有三个内置的image:背景图片、选中时图片、阴影图片,然后修改这三个image
CGRect rect = CGRectMake(0, 0, SCREENWIDTH, SCREENHEIGHT);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [[UIColor clearColor] CGColor]);
CGContextFillRect(context, rect);
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[TBC.tabBar setBackgroundImage:img];
[TBC.tabBar setShadowImage:img];
其实并没有删除横线(remove掉),只是把它变成透明的不影响操作和界面美观而已
以上就是视频直播app源码,去掉导航条和tabbar线条, 更多内容欢迎关注之后的文章
标签:app,源码,tabbar,导航条,去掉,线条 From: https://www.cnblogs.com/yunbaomengnan/p/17776925.html