Short Tutorial on Collection Views
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