subscript (safe index: Int) -> Element?
func subtract(_ other: [Element]) -> [Element]
func distance(to index: Index) -> Int
var doubleValue: Double
func roundToDecimals(_ decimals: Int, rule: FloatingPointRoundingRule = .toNearestOrAwayFromZero) -> Double
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/
convenience init(asyncFunc: @escaping () async throws -> Output)
convenience init(asyncFunc: @escaping () async -> Output)
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)
Helpers available via:
Helpers is available under the MIT license. See the LICENSE file for more info.
link |
Stars: 1 |
Last commit: 1 week ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics