Skip to content

Releases: sparrowcode/PerspectiveKit

2.4.0

Choose a tag to compare

@ivanvorobei ivanvorobei released this 29 Oct 10:05
  • PerspectiveView casts 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 shadowPath set from outside is never overwritten
  • README: rounded card with a background in the UIKit example

2.3.0

Choose a tag to compare

@ivanvorobei ivanvorobei released this 28 Oct 07:52
  • PerspectiveView tilts 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 bounce
  • isTilted switches without animation, init(config:isTilted:) starts flat or tilted
  • A transition can be interrupted midway, Reduce Motion skips the pop, the view's own transform stays free
  • README: code with a comment above it

2.2.0

Choose a tag to compare

@ivanvorobei ivanvorobei released this 27 Oct 04:10
  • 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 PerspectiveView container for UIKit: perspective lives in sublayerTransform, so no zPosition lift, 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

Choose a tag to compare

@ivanvorobei ivanvorobei released this 27 Oct 02:28
  • 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 resets zPosition
  • distortion of 0 or below rotates without perspective instead of breaking the transform

2.0.0

Choose a tag to compare

@ivanvorobei ivanvorobei released this 26 Oct 17:13

Renamed to PerspectiveKit.

  • Swift 6, iOS 15+, Swift Package Manager only
  • SwiftUI modifier .perspective(_:) next to UIView.applyPerspective(_:)
  • PerspectiveConfig is now a value type; presets .widgetAnimatable and .widgetStatic
  • Types lost the SP prefix, vectorStep removed (it had no effect)
  • New SwiftUI example app with sliders

Fixed z index for static transform.

Choose a tag to compare

@ivanvorobei ivanvorobei released this 03 Nov 14:31
1.4.1

Fixed z index for static transform.

Updated Readme.

Choose a tag to compare

@ivanvorobei ivanvorobei released this 01 Oct 10:56
1.4.0

Updated Readme.

Fixed for compability.

Choose a tag to compare

@ivanvorobei ivanvorobei released this 26 Aug 18:42
1.3.6

Fixed for compability.

Updated github assets.

Choose a tag to compare

@ivanvorobei ivanvorobei released this 12 Aug 15:23
1.3.5

Update SPPerspective.podspec

Fixed SPM.

Choose a tag to compare

@ivanvorobei ivanvorobei released this 22 Jul 20:04
1.3.4

Updated readme and version.