相关疑难解决方法(0)

更改UISegmentedControl的字体大小

任何人都可以告诉我如何更改字体类型和大小UISegmentedControl

iphone cocoa-touch font-size uisegmentedcontrol ios

217
推荐指数
7
解决办法
10万
查看次数

如何更改UISegmentedControl上文本的字体大小?

以下是初始化我的代码UISegmentedControl.

- (void)initializeToolButtons
{
    NSArray *buttonTitles = [NSArray arrayWithObjects:@"ANNEXET", @"HOVET", @"GLOBEN", "ALL", nil];

    toolbuttons = [[UISegmentedControl alloc] initWithItems:buttonTitles];
    toolbuttons.segmentedControlStyle = UISegmentedControlStyleBar;
    toolbuttons.tintColor = [UIColor darkGrayColor];
    toolbuttons.backgroundColor = [UIColor blackColor];     
    toolbuttons.frame = CGRectMake(0, 0, 320, 30);

    [toolbuttons addTarget:self action:@selector(toolButtonsAction) forControlEvents:UIControlEventValueChanged];

    [self.view addSubview:toolbuttons];
}
Run Code Online (Sandbox Code Playgroud)

如何减少每个项目的字体大小UISegmentedControl

注意: toolButtons已经在全球范围内声明.

size fonts uisegmentedcontrol ios

5
推荐指数
2
解决办法
9808
查看次数

标签 统计

ios ×2

uisegmentedcontrol ×2

cocoa-touch ×1

font-size ×1

fonts ×1

iphone ×1

size ×1