0

I am trying to set different string but on label it's showing question mark only.

I want to assign different string to the label by storyboard or programmatically, but both way it's showing question mark only. Please help me.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Kratos
  • 64
  • 6

2 Answers2

1

So basically you need to:

  1. Ensure that there's a font in your system that supports these special symbols. You need to manually find the font you want to use with your app.

  2. Find Font property in Interface Builder for that label (it's where you see "System 17.0" on your screenshot), select that font and enter text you need.

  3. If the font is not from the list of standard fonts, in order to ship your app with that font for it to be displayed on other devices, be sure to properly embed your custom font into the app (super important step): Can I embed a custom font in an iPhone application?. In short:

    • Copy your font files into resources
    • Add a key to your Info.plist file called UIAppFonts ("Fonts provided by application").
    • You can now use it programmatically too: [UIFont fontWithName:@"CustomFontName" size:12] // swift: UIFont(name:"CustomFontName" size:12).
Hexfire
  • 5,945
  • 8
  • 32
  • 42
1

First add the font to the xcode resource folder and then do not forget to add it to project .plist file under "Fonts provided by applications". Please also try removing any spacing in the font name and renaming it if present.