UITextView Attributed Text
I have a UITextView I want to apply attributes to. It can hold 5
characters per line. When I set the attributedText to my
NSMutableAttributedString, spaces within the string are removed. For
example:
NSMutableAttributedString *moreThan5spaces = [[NSMutableAttributedString
alloc] initWithString:@" AAA"]; //7 spaces and then text
self.textView.attributedText = moreThan5spaces;
When I do this, the text "AAA" should appear on the 2nd line, starting
with 2 spaces in front of it. I will use underscores to represent space in
this example:
//I want this:
_____
__AAA
//But I get this:
_____
AAA
When the characters wrap to a new line, spaces are removed. How can I
prevent this?
No comments:
Post a Comment