gpt4 book ai didi

iphone - 更改UISegment控件的字体颜色和大小

转载 作者:行者123 更新时间:2023-12-03 20:23:07 26 4
gpt4 key购买 nike

我想更改uisegment控件的字体颜色和字体大小。有可能吗?

如果有人这样做并且有人有解决方案,请告诉我或分享任何有用的链接

谢谢。

最佳答案

正如其他一些答案提到的,您还可以使用 setTitleTextAttributes:forState:

UIFont *font = [UIFont boldSystemFontOfSize:12.0f];
NSDictionary *attributes = [NSDictionary dictionaryWithObject:font
forKey:UITextAttributeFont];
[segmentedControl setTitleTextAttributes:attributes
forState:UIControlStateNormal];

关于iphone - 更改UISegment控件的字体颜色和大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7567131/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com