3
我正在更改UIButton字体大小,但它不起作用。UIButton字体大小不变
UIButton*headingButton=[UIButton buttonWithType:UIButtonTypeCustom];
headingButton.frame=CGRectMake(182, 4, 450, 42);
[headingButton setTitleColor:[UIColor colorWithRed:36/255.0 green:71/255.0 blue:113/255.0 alpha:1.0] forState:UIControlStateNormal];
[headingButton.titleLabel.setFont = [UIFont fontWithName:@“Myriad Pro Bold”size:24]]; – Ali
我已经尝试过这样但不工作 – Ali
这不是正确的格式。使用[headingButton.titleLabel setFont:[UIFont fontWithName:@“Myriad Pro Bold”size:24]];如果这不是你的问题,请参阅我的编辑 –