• 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: cocoa app from scratch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cocoa app from scratch


  • Subject: Re: cocoa app from scratch
  • From: Steve Sims <email@hidden>
  • Date: Sat, 31 Jul 2004 16:49:47 -0400

Over the past few weeks many people wrote many things in this thread. I can't be bothered to quote anything. :-)

I didn't read this thread when it first appeared on the list, but have just caught up with it. I must say I find it incredulous to think that anybody would contemplate generating their UI completely programatically.

There are two big reasons that I wouldn't contemplate doing this:
1) It's *way* too much hard work
2) It's rather difficult to create a UI programatically that matches UI guidelines and looks good

Now I have no big problem with programatically generated interfaces. I've created a few of them myself in the past, although they weren't completely programatically generated - just the parts that had to be done that way. It's incredibly rare that a UI will need to be completely generated by code so it makes sense to me to use the tools available to make the static parts of the UI easier to build. Going the complete programatic route just means much more coding.

It should be noted that IB can be used to help programatically generate interfaces - you can drag views into nib file windows (the window with the instances, classes, images, etc. tabs), not just the windows contained within the nib. These views can then be edited as if they were a complete window. Link that view to an outlet in a controller object so you get a reference then at run-time you can copy it and use addSubView to add it to a window. As other people have pointed out you can also get IB to re-read header files of your custom views and controllers.

The second point I made above is about UI guidelines, and IB does a great job at helping you follow the rules. Controls snap to appropriate positions, ensuring that they are spaced correctly. The Option key is also your friend - once you have selected a view holding the option key means that you'll see distances from the selected view to the one your pointer is hovering over. It's not quite so easy through coding alone to make the UI of a Mac application look like it belongs on a Macintosh.

Steve
_______________________________________________
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.


References: 
 >Re: cocoa app from scratch (From: Shalev NessAiver <email@hidden>)
 >Re: cocoa app from scratch (From: mmalcolm crawford <email@hidden>)
 >Re: cocoa app from scratch (From: Finlay Dobbie <email@hidden>)
 >Re: cocoa app from scratch (From: Scott Thompson <email@hidden>)
 >Re: cocoa app from scratch (From: "Dennis C. De Mars" <email@hidden>)

  • Prev by Date: WORKAROUND: observing changes in an NSArrayController's selection
  • Next by Date: CGShading
  • Previous by thread: Re: cocoa app from scratch
  • Next by thread: Re: cocoa app from scratch
  • Index(es):
    • Date
    • Thread