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]];如果這不是你的問題,請參閱我的編輯 –