Re: RS: display API
Re: RS: display API
- Subject: Re: RS: display API
- From: "Finlay Dobbie" <email@hidden>
- Date: Wed, 21 Feb 2007 12:47:54 +0000
On 21/02/07, Roland Silver <email@hidden> wrote:
I want to create a window "on the fly", rather than relying on
Interface Builder. Is there a reference describing what functions are
available (using Objective-C, in particular) for creating windows and
various types of view?
Unless you have a good reason to, I'd avoid it. Creating windows and
views are just a case of allocating them and using the designated
initialiser (initWithContentRect:styleMask:backing:defer: for
NSWindow, initWithFrame: for NSView), then constructing a view
heirarchy (setContentView: on NSWindow, then addSubview: etc) and
setting all the relevant other flags for your controls/views. See the
reference manual for more information.
But it's really probably not what you want to do in most cases - a
much easier methodology most of the time is to construct template
views in Interface Builder and create copies at runtime, adjusting
them as necessary.
-- Finlay
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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