• 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
NSView positioning problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSView positioning problems


  • Subject: NSView positioning problems
  • From: Andre Masse <email@hidden>
  • Date: Sun, 16 Nov 2008 13:25:07 -0500

Hi all,

In a nib, I have a view (OutputView) which contains a table view and a custom view (OutputToolbarView) which will be loaded from another nib. This view will end up in a NSTabView. So in IB, I placed a dummy custom view above the table view like this:

-------------------------
|         custom        |
-------------------------
|                       |
|      table view       |
|                       |
|_______________________|

In the window controller -windowDidLoad method, I load the the OutputView which loads the OutputToolbarView (each have their own NSViewControllers).

Now, I tried to make the replacement in the OutputView's controller awakeFromNib method but this puts the custom view on top of the table view, positioned at the origin specified for the custom view in the nib. That's because the replacement happens before the table view had the chance to resize itself according to the window's height (I think). If instead of replacing the custom view, I add it as a subview of the dummy custom view, the origin is correct but it doesn't fill the window's width.

I've read the documentation about NSView and it's companion guide but it's a big chunk to swallow and I would like to see a simple example on where to put the code for replacing a view.

Thanks,

Andre Masse
_______________________________________________

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


  • Follow-Ups:
    • Re: NSView positioning problems
      • From: Quincey Morris <email@hidden>
    • Re: NSView positioning problems
      • From: Iceberg-Dev <email@hidden>
  • Prev by Date: NSArrayController bound to an array of strings
  • Next by Date: Re: NSArrayController bound to an array of strings
  • Previous by thread: Re: NSArrayController bound to an array of strings
  • Next by thread: Re: NSView positioning problems
  • Index(es):
    • Date
    • Thread