• 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
Layering NSViews -- why isn't this recommended?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Layering NSViews -- why isn't this recommended?


  • Subject: Layering NSViews -- why isn't this recommended?
  • From: "Michael P. Rogers" <email@hidden>
  • Date: Wed, 6 Jun 2001 22:29:34 -0500

I've been trying to create a pile of cards that are offset -- so each card is to the right and below the one beneath it (ala Eric's Solitaire, which I believe used to ship with the Mac at one time). My Cards are subclasses of NSImageView.

My plan is to

1) make a Card class (subclass of NSImageView)
2) place those Cards in a Window's contentView using a method in NSView that sounded promising, addSubview:positioned:relativeTo:.

It seems to work, but the documentation has this dire warning:

"addSubview:positioned:relativeTo:, allows you to specify the ordering of NSViews that may overlap (though laying out NSViews so that they overlap isn't recommended)."

Does anybody know why this isn't recommended? And otherwise, how can I accomplish this? In Java there's a JLayeredPane; is there any equivalent in the Application Kit?

Thanks,

Michael
--
---------------------------------
Dr. Michael Rogers
e-mail: email@hidden
Phone: 217-424-6327

For information about Computer Science at Millikin University, visit http://math.millikin.edu
For information about astronomy, check out http://twincityamateurastronomers.org


  • Follow-Ups:
    • Re: Layering NSViews -- why isn't this recommended?
      • From: Andrew Platzer <email@hidden>
    • Re: Layering NSViews -- why isn't this recommended?
      • From: "John C. Randolph" <email@hidden>
    • Re: Layering NSViews -- why isn't this recommended?
      • From: Christopher Lloyd <email@hidden>
    • Re: Layering NSViews -- why isn't this recommended?
      • From: Brian Hill <email@hidden>
  • Prev by Date: Linux to OS X, HELP!
  • Next by Date: Re: Layering NSViews -- why isn't this recommended?
  • Previous by thread: Re: Linux to OS X, HELP!
  • Next by thread: Re: Layering NSViews -- why isn't this recommended?
  • Index(es):
    • Date
    • Thread