其實這個問題已被多次回答,但我不知道我在哪裏查找。我試過這個。 在ios中添加標籤中的字體
然後
- (void)viewDidLoad {
[super viewDidLoad];
lbl_openHouse = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 120)];
lbl_openHouse.textAlignment = NSTextAlignmentCenter;
lbl_openHouse.font = [UIFont fontWithName:@"Museo700-Regular" size:35];
}
但不工作。 即使我已經嘗試過找到字體的實際名稱,但沒有在日誌中顯示。
for (NSString* family in [UIFont familyNames])
{
NSLog(@"%@", family);
for (NSString* name in [UIFont fontNamesForFamilyName: family])
{
NSLog(@" %@", name);
}
}
我想,你缺少檢查這個[答案](http://stackoverflow.com/a/35454097/1603234),讓我知道它是否會幫助你。 – Hemang
你的plist看起來不對。似乎該字體不是INSIDE數組「應用程序提供的字體」。箭頭已關閉,但仍顯示該值。 – Larme
我編輯過,但仍然沒有工作.. –