• 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
Custom View usage in Interface Builder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom View usage in Interface Builder


  • Subject: Custom View usage in Interface Builder
  • From: "Alexander F. Hartner" <email@hidden>
  • Date: Fri, 25 Jun 2004 22:38:54 +0200

I am trying to create a number of custom views which I could later on add and remove from my main window. I though about creating and designing the views in Interface Builder and attach the various outlets and actions to the appropriate controller(s).

So I started out with a little example during which i followed these steps:

1.) Created 3 views. One main view and two views which are nested inside the main view.
2.) Added various labels to the views
3.) Added several buttons connection to action to show and hide the views
4.) Added outlets to my controller and connected them to the views

I now have an application which allows me to hide / unhide the individual views. But I have a few questions :

1.) When I add components using Interface Builder to the view inside the main window all the components are visible. But when I add components to the view panel, accessed by double clicking on the view instance, they do not appear in the final application. This also raises several other questions :
1.1) What is the purpose of being able to double click on a view and add components to the view in the view panel rather then on embedded view inside the main window
1.2) Is there a better way to use a view customized in Interface Builder from Cocoa.

2.) The size of the view is fixed by interface builder as it is included in the parent view. Is it possible to use a view designed in cocoa and simple add it via addSubView ?
2.1) Will this respect the minimum size defined in Interface Builder for the few.
2.2) Will other views added in the same manor respect the size of the view and position themselves next, below, above the added view. Ideally I would like the behavior similar to Java's FlowLayout. Is this possible or will have to do the placing myself ?

Any suggestion / answer or examples are welcome.
Thanks
Alex
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Custom View usage in Interface Builder
      • From: j o a r <email@hidden>
  • Prev by Date: Re: NSMutableDictionary member access problem
  • Next by Date: Re: Delaying a drag event
  • Previous by thread: Re: NSMutableDictionary member access problem
  • Next by thread: Re: Custom View usage in Interface Builder
  • Index(es):
    • Date
    • Thread