About CNGridView
CNGridView is an elegant, customizable grid view style control that is specifically designed for macOS applications. This unique, easy-to-use library provides an advanced control by harnessing the power and flexibility of macOS’s built-in NSCollectionView while providing additional features and getting rid of many limitations and bugs.
Main Features
- Highly customizable grid view control for macOS applications
- Overcomes limitations encountered with NSCollectionView
- Supports different selection modes, including single, multiple, and none
- Drag and drop functionality
- Compatible with both XIB files and programmatically created interfaces
- Swiftly handles large datasets
Installation
CNGridView can be installed via CocoaPods or Carthage. Both these options cater to novices and experts alike.
Usage Guide
Utilising CNGridView in your macOS application can be done by following a few simple steps. From importing the needed classes to customizing your grid view, this guide takes you step-by-step through the process.
Step 1: Import CNGridView
import CNGridView
Step 2: Implement CNGridViewDelegate and CNGridViewDataSource
class ExampleViewController: CNGridViewDelegate, CNGridViewDataSource {…
}
Step 3: Create and Customize Grid View
let gridView = CNGridView(frame: self.view.bounds)
gridView.delegate = self
gridView.dataSource = self
gridView.backgroundColor = NSColor.white
…
Contributing to CNGridView
CNGridView is open-source and contributions from the community are always welcomed and appreciated. For those looking to contribute, please check out the Contribution Guide.
License
CNGridView is distributed under the MIT License. This allows a high level of freedom for both personal and commercial use, but doesn’t offer any warranty or liability protection.