我遇到一个问题,我的项目中允许用户选择标签的字体,但是当用户使用不同的按钮设置标签大小时,标签会重置为默认字体。我希望能够保留用户应用的字体,同时允许用户更改字体大小。非常感谢任何帮助!以下是我的代码:
-(IBAction)setFont{
[userText setFont:[UIFont fontWithName:@"Arial-BoldMT" size:50.0]];
//I had to add a size when setting the font or else I got an error
}
-(IBAction)setFontSize{
[userText setFont:[UIFont systemFontOfSize:24]];
}