0

I am creating an application for Dutch and English language. So I add my string values to Localizable.strings file. Now I want to change only one items first letter should be capitalized. For example, my string like this

A. I am in.

B. I am out.

I want to capitalize A. and B. and C. etc. I want to do it programmatically.

How can I do this in ios using swift as a language.

Amsheer
  • 7,046
  • 8
  • 47
  • 81

1 Answers1

0

Try to add attribute to string i.e.

yourString.addAttribute(NSFontAttributeName, value: UIFont( name: "HelveticaNeue-Bold", size: 18.0)!, range: NSRange( location:2, length:4))

here you can decide location for word in string.Hope it will work :) Also please refer following link :- http://makeapppie.com/2014/10/20/swift-swift-using-attributed-strings-in-swift/