-4

I have a uitextview. I want to select the content in the uitextview and make it bold,italics,change colour and add the line spacing.I want to save the content . After saving i want to see the changes.Is there any way to do it

rmaddy
  • 314,917
  • 42
  • 532
  • 579
jibu
  • 1

1 Answers1

1

You can do something like this,

 textView.textColor = [UIColor orangeColor];

 UIFontDescriptor * fontD = [textView.font.fontDescriptor fontDescriptorWithSymbolicTraits:UIFontDescriptorTraitBold | UIFontDescriptorTraitItalic ];

 textView.font = [UIFont fontWithDescriptor:fontD size:0];

size:0 means 'keep the size as is'

Hope this will help :)

Ketan Parmar
  • 27,092
  • 9
  • 50
  • 75