Skip to content

1.0.0

Latest

Choose a tag to compare

@cruisediary cruisediary released this 24 Mar 08:40

What's New

SwiftUI Support

Full SwiftUI API — PastelGradientView, PastelText, PastelImage, and .pastelBackground() ViewModifier. All components share PastelAnimationState for synchronized multi-component animation.

PastelGradientView(gradient: .sunset, duration: 4.0)
PastelText("Hello", font: .largeTitle, gradient: .trueSunset)
Text("Hello").pastelBackground(.ripeMalinka)

Animation Resilience Fix

Replaced the fragile CABasicAnimation delegate chain with a single CAKeyframeAnimation(repeatCount: .infinity). Animation no longer stops on modal presentation (.pageSheet).

Gradient Image Masking

PastelImageView (UIKit) and PastelImage (SwiftUI) apply animated gradients to image assets.

// UIKit
let logoView = PastelImageView(frame: .zero)
logoView.image = UIImage(named: "logo")
logoView.setColors(PastelGradient.malibuBeach.colors())
logoView.startAnimation()

// SwiftUI
PastelImage(uiImage, gradient: .malibuBeach, duration: 3.0)

30 Built-in Gradient Presets

PastelGradient enum with 30 presets available across UIKit and SwiftUI.

Compatibility

iOS 16.0+
Swift 5.9+
Distribution SPM · CocoaPods
Breaking changes None — existing PastelView API unchanged