UINavigationBar透明

//    self.navigationController.navigationBar.translucent=YES;

//    UIColor *color = [UIColor clearColor];

//    CGRect rect = CGRectMake(0.0, 0.0, SCREEN_WIDTH, 64);

//    UIGraphicsBeginImageContext(rect.size);

//    CGContextRef context = UIGraphicsGetCurrentContext();

//    CGContextSetFillColorWithColor(context, [color CGColor]);

//    CGContextFillRect(context, rect);

//    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();

//    UIGraphicsEndImageContext();

//    

//    [self.navigationController.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];

//    self.navigationController.navigationBar.clipsToBounds = YES;

 

[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];

    self.navigationController.navigationBar.shadowImage = [UIImage new];

    self.navigationController.navigationBar.translucent = YES;

posted on 2016-07-14 17:51  鬼手渔翁  阅读(134)  评论(0)    收藏  举报

导航