Skip to content

0.8.0

Pre-release
Pre-release

Choose a tag to compare

@Kyle-Ye Kyle-Ye released this 07 Sep 18:55
· 86 commits to main since this release
0af53c9

Milestone

  • OpenObservation macro support
  • macOS Animation support via CVDisplayLink
  • RenderEffect support
  • Transition API support
import OpenObservation
import OpenSwiftUI

@Observable
private class Model {
    var showRed = false
}

struct ObservationExample: View {
    @State private var model = Model()

    private var showRed: Bool {
        get { model.showRed }
        nonmutating set { model.showRed = newValue }
    }

    var body: some View {
        VStack {
            Color(platformColor: showRed ? .red : .blue)
                .frame(width: showRed ? 200 : 400, height: showRed ? 200 : 400)
        }
        .animation(.spring, value: showRed)
        .onAppear {
            DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
                showRed.toggle()
            }
        }
    }
}
screnshot.mov

What's Changed

Full Changelog: 0.7.3...0.8.0