ProtoKit is a collection of protocols and extensions that make prototyping faster and easier with Swift programming language
ProtoKit is structured as a Package (Swift Package Manager), each swift file contains a specific feature / functionality. Because Swift Package Manager currently lacks support for iOS, a build.sh -script is provided to facilitate use of this framework.
Current features are:
- Closurable (UIControl, UIButton, UIBarButtonItem, UIPageControl, UIGestureRecognizer)
- SourcedError (Custom ErrorType)
- Observer / TypedNotification (way to pass data via observing/notifying)
- Unified Collection (factory and related methods for creating UITableViewDataSources and UICollectionViewDataSources)
ProtoKit version 3.0 and later requires:
- iOS 11+ or tvOS 11+
- Swift 4.1
- Xcode 9.3
- may work also for MacOS 10.11+, does not have support for Unified Collection
- watchOS is not supported
Protocol naming conventions
Protocol types and naming conventions used in this framework:
- Can do => -able => Hashable, RawRepresentable, Equatable
- Is a => -Type => CollectionType, SequenceType, ErrorType
- Can be => -Convertible => FloatLiteralConvertible, CustomStringConvertible
Created and maintained by @moximillian.
Unified Collection inspired by
ProtoKit is released under an MIT License. See
LICENSE for details.
Copyright © 2018-present Mox Soini.
Please provide attribution, it is greatly appreciated.
Help us keep the lights on
3.2.0 - May 22, 2018
3.1.0 - Apr 23, 2018
new protocol: Instantiable, replaces Storyboard.instantiate()
3.0.0 - Apr 8, 2018
Requires Xcode 9.3 or later (Swift 4.1)
- Removed Castable
- Removed Injectable
- Added Observer
3.0-beta - Feb 25, 2018
This release requires Swift 4.1 or newer. Removal of Injectable Addition of Observer (Notification posting and listening) Refactoring of UnifiedCollection to take advantage of latest in Swift 4.1