-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
  • 307,833
  • 40
  • 508
  • 550
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
  • 26,610
  • 9
  • 47
  • 70