ios中导航控件中的自定义工具栏不显示按钮文本(在本例中,添加按钮和编辑按钮文本)
您的代码中有bug 要么删除这条线,要么给它一些其他颜色ios中导航控件中的自定义工具栏不显示按钮文本(在本例中,添加按钮和编辑按钮文本),ios,iphone,Ios,Iphone,您的代码中有bug 要么删除这条线,要么给它一些其他颜色 UIToolbar *toolBar=[[UIToolbar alloc] initWithFrame:CGRectMake(160.0,20, 150, 30)]; toolBar.barStyle= style toolBar.tintColor=[UIColor clearColor]; toolBar.backgroundColor=[UIColor clearColor]; NSArray *items=[NSArr
UIToolbar *toolBar=[[UIToolbar alloc] initWithFrame:CGRectMake(160.0,20, 150, 30)];
toolBar.barStyle= style
toolBar.tintColor=[UIColor clearColor];
toolBar.backgroundColor=[UIColor clearColor];
NSArray *items=[NSArray arrayWithObjects:addBarButton,self.editButtonItem,nil];
[toolBar setItems:items];
UIBarButtonItem *barItem=[[UIBarButtonItem alloc]
self.navigationItem.rightBarButtonItem=barItem;
self.navigationController.toolbarHidden=YES;
或者改成
toolBar.tintColor=[UIColor clearColor];
这就解决了你的问题。非常感谢。它很有效。看起来你忘记投票了。谢谢。:-)投赞成票需要15个声誉先生我刚开始做这个
toolBar.tintColor=[UIColor clearColor];
toolBar.tintColor=[UIColor blueColor];