Repository navigation
Releases: sparrowcode/PerspectiveKit
Releases · sparrowcode/PerspectiveKit
Release list
2.4.0
PerspectiveViewcasts the shadow from the shape of a single rounded card inside it (corner radius, clipped corners, a background), so there is no offscreen pass on every frame to find the shadow outline. On iPhone 17 Pro the render server load drops by 20–40%, the shadow looks the same- The shadow path follows the card size, animated changes included
- Other content (several views, a clear background, a custom shape) keeps the shadow from its pixels, as before. A
shadowPathset from outside is never overwritten - README: rounded card with a background in the UIKit example
2.3.0
PerspectiveViewtilts on and off with a transition:setTilted(_:animated:). On tilt the view pops toward the viewer and settles into the tilt, on the way back it levels out in the air and lands without a bounceisTiltedswitches without animation,init(config:isTilted:)starts flat or tilted- A transition can be interrupted midway, Reduce Motion skips the pop, the view's own
transformstays free - README: code with a comment above it
2.2.0
- Matches the iOS 27 widget gallery: 10° tilt, 16 s cycle, counterclockwise by default, shadow moving on a circle around the card (blur 18, opacity 0.27)
- One continuous motion for UIKit and SwiftUI: the tilt axis moves evenly around the circle with a constant angle, no kinks at corners, both render identically
- New
PerspectiveViewcontainer for UIKit: perspective lives insublayerTransform, so nozPositionlift, the wrapped view's own state is untouched, and Reduce Motion and dark mode apply live - Reduce Motion keeps a static tilt in both UIKit and SwiftUI
- SwiftUI keeps the phase when the duration changes
- Deprecated:
UIView.applyPerspective(_:),resetPerspective(),PerspectiveCorner.random,cycle(_:)
2.1.0
- SwiftUI
.perspective(_:)redraws at most 60 times per second (was up to 120 on ProMotion) - No compositing group and shadow pass when the config has no shadow
resetPerspective()also resetszPositiondistortionof 0 or below rotates without perspective instead of breaking the transform
2.0.0
Renamed to PerspectiveKit.
- Swift 6, iOS 15+, Swift Package Manager only
- SwiftUI modifier
.perspective(_:)next toUIView.applyPerspective(_:) PerspectiveConfigis now a value type; presets.widgetAnimatableand.widgetStatic- Types lost the
SPprefix,vectorStepremoved (it had no effect) - New SwiftUI example app with sliders
Fixed z index for static transform.
1.4.1 Fixed z index for static transform.
Updated Readme.
Fixed for compability.
1.3.6 Fixed for compability.
Updated github assets.
1.3.5 Update SPPerspective.podspec