PhantomKit
PhantomKit is a collection of many useful Swift and SwiftUI extensions and components. It is an invisible layer that supports your application and makes writing Swift code easier.
Requirements
- iOS 14.0+
- Xcode 12.0+
- Swift 5.3+
Installation
Swift Package Manager
PhantomKit is available as a Swift Package.
Alternatively, you can add PhantomKit as a SPM dependency:
Tip: to make PhantomKit truly invisible add the below line in the main file:
Highlights
Opening a NavigationLink on tap gesture
- Natively
- With PhantomKit
Executing an action before and after opening a NavigationLink
Opening a Web View
SwiftUI extensions
aligned
Before
After
expandingBackgroundColor
Before
After
Xcore extensions
- Date manipulation
Before
After
- In-flight modifications with
Appliable
andMutableAppliable
Before
After
and many more...!
Reference
Routing
Two enums for native SwiftUI routing:
View helpers:
Examples:
Formatting
LocalizedFormatter
A custom LocalizedFormatter
that automatically formats numbers, decimals and currencies for a specified locale:
Examples:
LocalizedDateFormatter
A custom LocalizedDateFormatter
that automatically formats date and time for a specified locale:
Examples:
Roadmap
- [x] SwiftUI
- [x] Routing
- [x] Localized formatters
- [x] Network layer
- [x] Third party extensions
- [x] SPM compatibility
- [ ] Database extensions
- [ ] Core Data
- [ ] Realm
- [ ] Complete documentation