Re: extra redrawing with [self setBounds:] in drawRect:
Re: extra redrawing with [self setBounds:] in drawRect:
- Subject: Re: extra redrawing with [self setBounds:] in drawRect:
- From: Jim Correia <email@hidden>
- Date: Mon, 28 Jan 2008 21:32:42 -0500
On Jan 28, 2008, at 8:43 PM, Nathan Vander Wilt wrote:
extra redrawing with [self setBounds:] in drawRect:
In my custom view, I set the bounds in my drawRect:
method before drawing. This is so that while the user
is resizing the window, the content stretches with the
view.
[...]
Somehow this selection rectangle code triggers random
extra redrawing.
It is unclear why you need to resize your view inside of -drawRect:.
This is surely the root cause of your problem.
If your view cannot be automatically resized when the window is
resized via springs and struts, use the appropriate mechanism to
adjust the view's frame.
Resizing the view inside of -drawRect: doesn't sound like good design.
And it isn't terribly surprising that it might confuse the code which
tracks view invalidation.
Jim
_______________________________________________
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