• 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: Swapping IB-created views and keeping IBOutlets hooked up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swapping IB-created views and keeping IBOutlets hooked up


  • Subject: Re: Swapping IB-created views and keeping IBOutlets hooked up
  • From: Keary Suska <email@hidden>
  • Date: Tue, 16 Sep 2008 16:45:17 -0600
  • Thread-topic: Swapping IB-created views and keeping IBOutlets hooked up

9/16/08 4:33 PM, also sprach email@hidden:

> I have two views that are different layouts of the same UI loaded by a
> NSViewController. Now lets say that I have an IBOutlet to an NSButton*
> button1 that is present in both views. I want to swap one view out for
> the other and when I do so have the IBOutlet for button1 swap to the
> button1 defined in the second view in another NIB.
>
> So for example, the viewcontroller inits with View A. button1 is
> assigned to the NSButton in View A. I then swap that view to View B
> which also have a button1. View B is in a different NIB. So I want
> button1 to now point to View B.  Is this something that can be done
> automatically?

No. The easiest alternative is to have accessors for the outlets, and set
them on swap.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

References: 
 >Swapping IB-created views and keeping IBOutlets hooked up (From: Alex Kac <email@hidden>)

  • Prev by Date: Re: Drawing on Another App's CGDisplayCapture
  • Next by Date: Re: Drawing on Another App's CGDisplayCapture
  • Previous by thread: Swapping IB-created views and keeping IBOutlets hooked up
  • Next by thread: Re: Swapping IB-created views and keeping IBOutlets hooked up
  • Index(es):
    • Date
    • Thread