Trouble with setWidthTracksTextView YES
Trouble with setWidthTracksTextView YES
- Subject: Trouble with setWidthTracksTextView YES
- From: Leonardo <email@hidden>
- Date: Wed, 25 Jun 2014 12:25:13 +0200
- Thread-topic: Trouble with setWidthTracksTextView YES
I have set my NSTextView as
[self.textContainer setWidthTracksTextView:YES];
[self.textContainer setHeightTracksTextView:YES];
It works pretty well. When I enter a new width, the text accommodates to the
new textView frame. Fine.
The problem comes when I resize the textView by dragging its bottom handle.
I continuously call [textView setFrameSize:newSize] which in turns changes
the container sizes, which in turn calls again [textView
setFrameSize:aSize]. The result is a chunky resize while the superview
scrolls without any reason apparently.
If I set
[self.textContainer setWidthTracksTextView:NO];
[self.textContainer setHeightTracksTextView:NO];
The trouble disappears. But the text doesn't shrink or enlarge as expected.
How to avoid this loop? Any idea?
Regards
-- Leonardo
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden