• 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: Dynamic View Creation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic View Creation


  • Subject: Re: Dynamic View Creation
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 16 Dec 2001 13:32:56 +0100

Brian,

>>>>>> Brian Webster (BW) wrote at Sat, 15 Dec 2001 21:36:28 -0600:
BW> >Now, from a programming standpoint, I want to be able to add/remove
BW> >views based on the View that I created. How do I dynamically place a
BW> >new View in a window? How do I dynamically add the necessary outlets
BW> >and action callbacks?
BW>
BW> To create a view programatically, you can simply say
BW>
BW> NSView *myView = [[NSView alloc] initWithFrame:NSMakeRect(myX,
BW> myY, myWidth, myHeight)];

Right, but in a vast majority of cases it is more convenient to prepare the
view in IB and load it from a separate NIB, just the very same way you
normally load windows and others.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc


References: 
 >Re: Dynamic View Creation (From: Brian Webster <email@hidden>)

  • Prev by Date: Re: Cocoa Documentation on NSFormatter
  • Next by Date: Re: Cocoa Documentation on NSFormatter
  • Previous by thread: Re: Dynamic View Creation
  • Next by thread: Problems with Apache
  • Index(es):
    • Date
    • Thread