使用系統(tǒng)tabbar樣式堕阔,并切改變系統(tǒng)tabbar上方線的顏色的方法:
給你一個方法包吝,可保留系統(tǒng)tabbar的毛玻璃效果枫吧,并成功更改頂部線的顏色痹束。
- (void) changeTopBarLineColor
{
//去除系統(tǒng)線
[UITabBar appearance].clipsToBounds = YES;
//添加自定義線
UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, PBSCREEN_WIDTH, 0.5)];
lineView.backgroundColor = [UIColor pb_colorWithHexString:c_whiteTwo_line];
[[UITabBar appearance] addSubview:lineView];
}
You're welcome!