2018-07-27 UIToolbar和uinavigationBar 底部黑色线条解决

UIToolbar *bar = [[UIToolbar alloc]init];
[self.view addSubview:bar];
[bar setBackgroundImage:[UIImage new] forToolbarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
bar.clipsToBounds = YES;
// [bar setShadowImage:[UIImage new] forToolbarPosition:UIBarPositionAny];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"arrows_white"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStyleDone target:self action:@selector(backClick)];
//可伸缩

UIBarButtonItem* flexItem=[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
bar.items = @[backItem,flexItem];

你可能感兴趣的:(2018-07-27 UIToolbar和uinavigationBar 底部黑色线条解决)