Re: growing an NSView?
Re: growing an NSView?
- Subject: Re: growing an NSView?
- From: Rainer Brockerhoff <email@hidden>
- Date: Thu, 8 Nov 2001 13:08:19 -0200
At 13:48 +0100 08/11/2001, Markus Hitter wrote:
Am Donnerstag den, 8. November 2001, um 12:56, schrieb Rainer Brockerhoff:
I can go into more detail, but briefly, when growing, I first grow
the window and then insert a new view into the empty part; when
shrinking, I remove the view and then shrink the window.
Do you really need to insert/remove the extra view? If you just
shrink the window, the view goes out of the window frame and becomes
invisible. Am I wrong here?
OK, if you use the extra view only rarely, this is probably a waste
of memory, but might be a memory and processor cycle saver in other
circumstances as well.
Actually, I move the view about 2000 pixels upwards (and then back)
instead of inserting and removing it. In terms of savings, it seems
there's not much difference.
If you just shrink the window, the view and its subviews will be
"combed" upwards to overlay other views - not what you usually wish
to happen. And depending on the "springs" in IB the view may be
resized in strange ways, even moving it upwards... inserting and
removing gives the least side effects.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"Originality is the art of concealing your sources."
http://www.brockerhoff.net/ (updated Oct. 2001)