GitXplorerGitXplorer
k

CollectionViewElCapitan

public
12 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
8c9d355e53aa0c5fde45b5df35c9562055a4e667

added link to Swift 4 version

kklaas committed 7 years ago
Unverified
d0095a5b29dcc2a272b1a9f19bfcc813516f2a9b

Merge branch 'ProgrammaticVersion' of https://github.com/klaas/CollectionViewElCapitan

kklaas committed 7 years ago
Unverified
721ed4529c8a784e2755a9423e501e1f1debdefe

updated README.md

kklaas committed 8 years ago
Unverified
f9801d222e2f9a2b91443fc708c76b23bc1c1940

ProgrammaticVersion

kklaas committed 8 years ago
Unverified
f446f29b02d5dbb86314d21a7b0f01f14fe81ce7

Update README.md

kklaas committed 8 years ago
Unverified
b0ea7e6ad6fc11e49e37cc478c410d7c804161b0

Cleanup for github release

kklaas committed 9 years ago

README

The README file for this repository.

🚨 This is a Swift 2 repo. The updated version: https://github.com/klaas/CollectionViewSwift4 🚨

CollectionViewElCapitan

Apple changed the way NSCollectionView works in OS 10.11 as shown in the talk "What's New in NSCollectionView" at WWDC 2015. They also provide a complex example written in Objective-C: CocoaSlideCollection

This is a simple sample project written in Swift.

It uses the standard Cocoa Application template and has a single view controller containing a collection view. It shows simple labels as items. You can select and double click items.

Notes

There is still a bug in Xcode (as of 7.3 (7D175)): When you add a NSCollectionView within Interface Bulider you'll get a compile error saying:

Main.storyboard: error: Unknown segue relationship: Prototype

The workaround used in this project is to remove the segue and create a .xib file containing the collection view item. The filename can then be used as an item identifier.

Programmatic Version

The branch ProgrammaticVersion contains a second NSCollectionView that does not rely on any Interface Builder files.