Skip to content

Releases: OpenSwiftUIProject/OpenSwiftUI

0.11.0

26 Oct 19:04
39c59d9

Choose a tag to compare

Milestone

New API support

  • ForEach
  • PositionLayout
  • LabeledContent
  • Transition system
import OpenSwiftUI

struct ContentView: View {
    @State private var opacities = [0, 0.5, 1.0]

    var body: some View {
        VStack(spacing: 0) {
            ForEach(opacities, id: \.self) { opacity in
                Color.red.opacity(opacity)
            }
        }.onAppear {
            DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
                withAnimation(.spring) {
                    opacities.insert(0.25, at: 1)
                    opacities.insert(0.75, at: 3)
                }
            }
        }
    }
}
ζˆͺ屏2025-10-27 03 03 44

Bug Fix

  • Fixed various miscellaneous issues

What's Changed

Full Changelog: 0.10.0...0.11.0

0.10.0

05 Oct 18:31
ebb0ebf

Choose a tag to compare

Milestone

  • Add StateObject/ObservedObject/EnvironmentObject support.
  • Update DynamicProperty/State/Binding implementation
  • Migrate documentation from SPI to GH pages.
import OpenObservation
import OpenSwiftUI

@Observable
private class Model {
    var showRed = false
}

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

    var body: some View {
        Subview()
            .environment(model)
    }
}

struct Subview: View {
    @Environment(Model.self) private var model

    var body: some View {
        Color(model.showRed ? .red : .blue)
    }
}

What's Changed

Full Changelog: 0.9.0...0.10.0

0.9.0

14 Sep 18:24
9a7abef

Choose a tag to compare

0.9.0 Pre-release
Pre-release

Milestone

  • visionOS build support
  • Timeline API support
import OpenSwiftUI

struct ContentView: View {
    var body: some View {
        TimelineView(.animation) { context in
            let time = context.date.timeIntervalSince1970
            ZStack {
                Color(hue: (sin(time * 0.5) + 1) / 2, saturation: 0.8, brightness: 0.9)
                Color(hue: (cos(time * 2) + 1) / 2, saturation: 1.0, brightness: 1.0)
                    .frame(width: 100 + sin(time * 3) * 20, height: 100 + sin(time * 3) * 20)
            }
        }
    }
}
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-09-15.at.02.10.03.mp4
2025-09-15.02.15.11.mov

What's Changed

  • Add visionOS support by @Kyle-Ye in #499
  • Add Timeline and Animation functionality by @Kyle-Ye in #500
  • Add usage of _ViewInputs.textAlwaysOnProvider by @Kyle-Ye in #501
  • [Bug Fix] Fix macOS animation and visionOS build issue by @Kyle-Ye in #506

Full Changelog: 0.8.0...0.9.0

0.8.0

07 Sep 18:55
0af53c9

Choose a tag to compare

0.8.0 Pre-release
Pre-release

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

0.7.3

24 Aug 18:54
4dd605e

Choose a tag to compare

0.7.3 Pre-release
Pre-release

Milestone

  • Add RotationEffect & Rotation3DEffect support
  • Add TransactionModifier support
  • Add GeometryReader support
image

What's Changed

Full Changelog: 0.7.2...0.7.3

0.7.2

17 Aug 19:56
3cef59f

Choose a tag to compare

0.7.2 Pre-release
Pre-release

Milestone

  • Add SpringAnimation support
  • Add basic PlatformViewControllerRepresentable and PlatformViewRepresentable support
  • Add Font support

What's Changed

Full Changelog: 0.7.1...0.7.2

0.7.1

27 Jul 18:58
e658752

Choose a tag to compare

0.7.1 Pre-release
Pre-release

Milestone

  • Add TaskModifier support
  • A few bug fixes and stability improvements

What's Changed

Full Changelog: 0.7.0...0.7.1

0.7.0

20 Jul 18:26
4bd1f28

Choose a tag to compare

0.7.0 Pre-release
Pre-release

Milestone:

  • Add async render support 1
  • Add Animation support for iOS platform.
  • Add onChange modifier API support
import OpenSwiftUI
struct ContentView: View {
    @State private var showRed = false
    var body: some View {
        VStack {
            Color(platformColor: showRed ? .red : .blue)
                .frame(width: showRed ? 200 : 400, height: showRed ? 200 : 400)
        }
        .animation(.easeInOut(duration: 2), value: showRed)
        .onAppear {
            DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
                showRed.toggle()
            }
        }
    }
}
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-07-20.at.03.03.42.mp4
import OpenSwiftUI
import Foundation

private struct ElasticEaseInEaseOutAnimation: CustomAnimation {
    let duration: TimeInterval

    func animate<V>(value: V, time: TimeInterval, context: inout AnimationContext<V>) -> V? where V: VectorArithmetic {
        if time > duration { return nil }
        let p = time / duration
        let s = sin((20 * p - 11.125) * ((2 * Double.pi) / 4.5))
        if p < 0.5 {
            return value.scaled(by: -(pow(2, 20 * p - 10) * s) / 2)
        } else {
            return value.scaled(by: (pow(2, -20 * p + 10) * s) / 2 + 1)
        }
    }
}

extension Animation {
    static var elasticEaseInEaseOut: Animation { elasticEaseInEaseOut(duration: 0.35) }

    static func elasticEaseInEaseOut(duration: TimeInterval) -> Animation {
        Animation(ElasticEaseInEaseOutAnimation(duration: duration))
    }
}

struct ContentView: View {
    @State private var isActive = false

    var body: some View {
        VStack(alignment: isActive ? .trailing : .leading) {
            Color.red
                .frame(width: 100.0, height: 100.0)
            Color.blue
                .frame(width: 300.0, height: 100.0)
        }
        .animation(.elasticEaseInEaseOut(duration: 2.0), value: isActive)
        .onAppear {
            DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
                isActive.toggle()
            }
        }
    }
}
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-07-21.at.02.24.54.mp4

What's Changed

Full Changelog: 0.6.0...0.7.0

  1. Via SwiftUI's Render. Currently only align with iOS 18.5 and macOS 15.5 Runtime. ↩

0.6.0

12 Jul 05:26
d8c8bf1

Choose a tag to compare

0.6.0 Pre-release
Pre-release

Milestone:

  • Add HVStack, Padding and Spacer support
  • Add offset and GeometryEffect support
import OpenSwiftUI

struct ContentView: View {
    var body: some View {
        VStack {
            HStack {
                Color.red.frame(width: 40, height: 40)
                Spacer()
                Color.blue.frame(width: 40, height: 40)
            }
            Spacer()
            Color.blue
                .frame(width: 80, height: 60)
                .background(Color.red.offset(x: -20, y: -15))
                .overlay(Color.green.offset(x: 20, y: 15))
            Spacer()
            HStack(spacing: 40) {
                Color.green.frame(width: 40, height: 40)
                Color.yellow.frame(width: 40, height: 40)
            }
        }
        .frame(width: 200, height: 200)
        .background(Color.gray.opacity(0.3))
    }
}
screenshot-mac

What's Changed

Full Changelog: 0.5.0...0.6.0

0.5.0

29 Jun 15:11
bd0ef2d

Choose a tag to compare

0.5.0 Pre-release
Pre-release

Milestone

  • Benchmark API (See BenchmarkApp.swift for more detail)
  • Gesture basic infra support

What's Changed

Full Changelog: 0.4.0...0.5.0