Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 更改 UISegmentedControl 的字体大小 如何更改 UISegmentedControl 文本的字体大小?
如何更改分段控件的文本大小?
任何人都可以帮助我!
注意:这仅适用于iOS5+。
UIFont *font = [UIFont boldSystemFontOfSize:12.0f]; NSDictionary *attributes = [NSDictionary dictionaryWithObject:font forKey:UITextAttributeFont]; [segmentedControl setTitleTextAttributes:attributes forState:UIControlStateNormal];