Hy guys I want that my textView
have this font: "Apple SD Gothic Light"
...
I used this code here belong:
if (titolo.text == NSLocalizedString("SEVENTH_ANNOTATION_TITLE", comment: "")){
// aggiungo le immagini all'array
pageImages = [UIImage(named: "TeatroMassimoBellini1.png")!,
UIImage(named: "TeatroMassimoBellini2.png")!,
UIImage(named: "TeatroMassimoBellini3.png")!]
textFieldDescrizione.text = NSLocalizedString("SEVENTH_ANNOTATION_DESCRIPTION", comment: "")
textFieldDescrizione.font = UIFont.preferredFontForTextStyle("AppleSDGothicNeo-Light")
textFieldDescrizione.textAlignment = NSTextAlignment.Justified
}
but it doesn't work.... Can you help me? Sorry for my english! :)
yes you can do it. [tFild_1 setFont:[UIFont fontWithName:@"Helvetica Neue" size:17]]; instead of "Helvetica Neue" use your font name.
Change Font And Size Of UILabel In Storyboard XIB file, open it in the interface builder. Select the label and then open up the Attribute Inspector (CMD + Option + 5). Select the button on the font box and then you can change your text size or font.
Swift 2 & 3: import UIKit extension UITextView { func increaseFontSize () { self. font = UIFont(name: (self. font?. fontName)!, size: (self.
Try this :
textFieldDescrizione.font = UIFont(name: "NameOfTheFont", size: 20)
For Swift 4 , this worked for me
textView.font = UIFont(name: "Courier", size: 20)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With