Skip to content

Instantly share code, notes, and snippets.

@cacaodev
Last active December 14, 2015 16:29
Show Gist options
  • Save cacaodev/5115755 to your computer and use it in GitHub Desktop.
Save cacaodev/5115755 to your computer and use it in GitHub Desktop.
CPCollectionView -setItemPrototype: documentation
Sets the item prototype to \c anItem.
If the item prototype view is located in an external cib file, then the representedObject, outlets and bindings will be automatically restored when an item is created.
If the prototype item view belong to the same cib as the collection view, then the item prototype should implement the CPCoding protocol
because the item is copied by archiving and unarchiving the
prototypal view.
Bindings won't be restored throught archiving, instead you need to subclass the -representedObject: method and update the view there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment