SwiftGridView 1.0 is a full modernization of the library. It is a breaking release — please read the migration notes below before upgrading.
Highlights
- Swift 6 ready — builds in Swift 6 language mode with complete strict concurrency. The public API is
@MainActor-isolated. - Pure-Swift API —
@objcis gone. Optional delegate/datasource methods are now protocol extensions with sensible defaults, so you only implement what you actually use. - SwiftUI support — the new
SwiftGridview wraps the grid for SwiftUI, using the same datasource and delegate you'd use in UIKit. - SPM-only — CocoaPods support has been removed. The package, examples, and tooling are all Swift Package Manager now.
- Tested and automated — a Swift Testing suite covering layout, frozen rows/columns, grouped headers, and selection runs on every PR, alongside a strict
swift-formatcheck. Documentation is now DocC, published automatically.
Requirements
- iOS 15.0+
- Xcode 16.0+
Migrating from 0.7.x
- CocoaPods → SPM. Remove
pod 'SwiftGridView'and add the package via Swift Package Manager. - Drop
@objcfrom your conformances. Formerly-optional methods now have defaults — delete any you only implemented to satisfy the compiler. Methods that return views (gridHeaderViewForColumn,sectionHeaderCellAtIndexPath, …) trap with a clear message if you enable a feature without implementing them. - Set
dataSourceanddelegatein code. They can no longer be Interface Builder outlets; a leftover storyboard/XIB connection raisesNSUnknownKeyExceptionat load. Assigngrid.dataSource = selfin code instead. - Objective-C is no longer supported.
Documentation
Full API documentation: https://nlampi.github.io/SwiftGridView/documentation/swiftgridview/
Note that documentation moved from jazzy to DocC, so older documentation URLs no longer resolve.
See the CHANGELOG for the complete list of changes.