• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: growing an NSView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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)


References: 
 >Re: growing an NSView? (From: Markus Hitter <email@hidden>)

  • Prev by Date: Re: Depends?
  • Next by Date: [Newbie] Basic file handling questions...
  • Previous by thread: Re: growing an NSView?
  • Next by thread: NSImageViews and redrawing bitmap data
  • Index(es):
    • Date
    • Thread