Dudi Dudi - 1 year ago 100
iOS Question

UITextView style is being reset after setting text property

I have

UITextView *_masterText
and after call method
property font is being reset.
It's happening after I change sdk 7.
_masterText is
, global and properties are set in storyboard. It's only me or this is general SDK bug?

@interface myViewController : UIViewController
IBOutlet UITextView *_masterText;

@implementation myViewController

[_masterText setText:@"New text"];

Answer Source

Sitting with this for hours, I found the bug. If the property "Selectable" = NO it will reset the font and fontcolor when setText is used.

So turn Selectable ON and the bug is gone.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download