首先确定是否用xib创建的view包含label,如果是,请在代码里设置label颜色,xib设置的颜色在iOS13不生效,本人尝试得出此结论
UIView * view = [UIView initWithFrame:CGRectMake(0, 0,70, 30)];
view.label.textColor = UIColor.blackColor;
UIBarButtonItem *onlineBar = [[UIBarButtonItem alloc] initWithCustomView:view];
[self.navigationItem setLeftBarButtonItem:onlineBar];
网友评论