有没有办法改变 UIToolbar 中字体的大小?我的文字放不下,所以我需要缩小它。
谢谢!
最佳答案
这是一个例子。我不确定你想要什么,但你可以在 uitoolbar 中调整 uibarbuttonitem 的字体大小。
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0,0,10,15)];
label.font = [UIFont systemFontOfSize:15.0];
label.textColor = [UIColor blackColor];
label.backgroundColor = [UIColor clearColor];
//label.adjustsFontSizeToFitWidth = YES;
label.textAlignment = UITextAlignmentCenter;
label.text = @"Bar";
UIBarButtonItem *item2 = [[UIBarButtonItem alloc]
initWithCustomView:label];
关于ios - 更改 UIToolbar 字体大小 - iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7192844/