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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to