• 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
Short Tutorial on Collection Views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Short Tutorial on Collection Views


  • Subject: Short Tutorial on Collection Views
  • From: Gordon Apple <email@hidden>
  • Date: Sun, 03 Mar 2013 13:09:49 -0600
  • Thread-topic: Short Tutorial on Collection Views

In your nib, drag in a collection view.  This will also get you a collection
view item and a prototype view, already connected together.  Ser the number
of rows/columns for the collection view.

Bind your collection view to an array controller.  Bind the latter to your
array of objects, each containing properties to be displayed or controlled
in each displayed element.

Construct your prototype view.  Bind its components to the collection view
item using ³representedObject².  The latter is actually a proxy for the
individual items in your array controller.  The collection view will
automatically route your bindings to the correct object in your array.

That¹s really all there is to it.

You only have to subclass the collection view and collection view item if
you need individual continuous access from each item (such as my movie
thumbnails).  Otherwise, don¹t bother.


_______________________________________________

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


  • Prev by Date: Re: More IB constraints woes
  • Next by Date: Re: move large data structure to Core Data?
  • Previous by thread: Re: move large data structure to Core Data?
  • Next by thread: File Path String From Save Panel
  • Index(es):
    • Date
    • Thread