Array;
subscript (safe index: Int) -> Element?
func subtract(_ other: [Element]) -> [Element]
func distance(to index: Index) -> Int
Decimal;
var doubleValue: Double
Double;
func roundToDecimals(_ decimals: Int, rule: FloatingPointRoundingRule = .toNearestOrAwayFromZero) -> Double
Date;
- work with unixMilliseconds;
- date components;
- beginning/end of date components;
- adding date components;
- comparison.
UserDefaults;
- provides getter and setter for Codable values.
Something I need sometimes;
- struct DateRange;
- protocol AppDetails - provides app version and build number;
- protocol AppStoreReview - provides dialog for Rate Us;
- protocol DeviceDetails - provides device model, system version and device locale;
- protocol ErrorLocalizedDescription;
- Formatter - easy way to format numbers;
- JsonObject - pretty typealias for [String: Any].
- Publisher:
func mapToVoid()
func mapToOptional()
func flatMapLatest()
func filterFalse()
func filterTrue()
func invert()
func mapArray<T>(transform)
func shareReplay(bufferSize) // Adapted from https://www.onswiftwings.com/posts/share-replay-operator/
- Future:
convenience init(asyncFunc: @escaping () async throws -> Output)
convenience init(asyncFunc: @escaping () async -> Output)
- IAPProduct model;
RxSwift Extensions (HelpersRxSwift):
func mapToVoid()
func filterFalse()
func filterTrue()
func invert()
func asDelayedActivity(_ delay: DispatchTimeInterval = .milliseconds(200))
func mapArray<T>(transform)
func fromAsync(_ block: { element in ... }) -> Single<Element>
ViewExtension:
/// Applies the given transform if the given condition evaluates to `true`
@ViewBuilder func `if`<Content: View>(_ condition: @autoclosure () -> Bool, transform: (Self) -> Content) -> some View
Modifiers:
func blink(on state: Binding<Bool>, duration: Double = 0.1)
func navigationBarColors(background: Color, tint: Color)
func onFrameChange(enabled isEnabled: Bool = true, frameHandler: @escaping (CGRect)->Void)
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner)
func onRotate(perform action: @escaping (UIDeviceOrientation) -> Void)
func rotateHandling(anchor: UnitPoint = .center)
func rotated(_ angle: Angle)
func shimmer(isActive: Bool = true, speed: Double = 0.15, angle: Angle = .init(degrees: 70), opacity: Double = 1.0)
Shapes:
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner)
Views
- MailView.
Helpers available via:
- Swift Package Manager by url: https://github.com/bigMOTOR/Helpers.git
Helpers is available under the MIT license. See the LICENSE file for more info.