隐藏系统tabbar上的黑色线条,亲测管用

1    CGRect rect = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
2     UIGraphicsBeginImageContext(rect.size);
3     CGContextRef context = UIGraphicsGetCurrentContext();
4     CGContextSetFillColorWithColor(context, [[UIColor clearColor] CGColor]);
5     CGContextFillRect(context, rect);
6     UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
7     UIGraphicsEndImageContext();
8     [self.tabBar setBackgroundImage:img];
9     [self.tabBar setShadowImage:img];

 

posted @ 2016-05-11 15:35  YouNeedCourage  阅读(363)  评论(0编辑  收藏  举报