Advertisement
duongntb94

[Bug] [React Native] [iOS] Unrecogized font family on iOS

Feb 17th, 2019
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // 1. Double check the fonts file are included in Target in Xcode
  2. // 2. Copy Bundles Resources
  3. // 3. Included on Info.plist of the app
  4. // 4. If still error, please check your font name with the following code.
  5.  
  6.   for (int i = 0; i < [UIFont.familyNames count]; i++) {
  7.     NSString *family = UIFont.familyNames[i];
  8.     NSArray *array = [UIFont fontNamesForFamilyName:family];
  9.     for (int j = 0; j < array.count; j++) {
  10.       NSString* data = array[j];
  11.       NSLog(@"%@", data);
  12.     }
  13.   }
  14. // Then get the name from data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement