-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Diffs= dde676085 Fix libjpg on Mac Sonoma (#7329) e0a786c90 Runtime API for Nested Inputs (#7316) Co-authored-by: Gordon Hayes <pggordonhayes@gmail.com> Co-authored-by: Philip Chung <philterdesign@gmail.com>
- Loading branch information
1 parent
1ee0c5f
commit 296c14d
Showing
10 changed files
with
188 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
01d20e02661309cd2f8a0702f9de102107c1a0f1 | ||
dde676085908d492af545660cbbb19ee0d10d91d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
13410e662550cd7ffd9c568d3880c3325f953314 | ||
f1ec43c82b136c33edfd71ec9759249d9fb5b182 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
Example-iOS/Source/Examples/SwiftUI/SwiftNestedInputs.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// SwiftNestedInputs.swift | ||
// RiveExample | ||
// | ||
// Created by Philip Chung on 05/27/2022. | ||
// Copyright © 2024 Rive. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import RiveRuntime | ||
|
||
struct SwiftNestedInputs: DismissableView { | ||
var dismiss: () -> Void = {} | ||
|
||
// MARK: RiveViewModel | ||
// This view model specifies the exact StateMachine that it wants from the file | ||
@StateObject private var stateChanger = RiveViewModel(fileName: "runtime_nested_inputs", stateMachineName: "MainStateMachine") | ||
|
||
var body: some View { | ||
ScrollView{ | ||
VStack { | ||
stateChanger.view() | ||
.frame(height:200) | ||
|
||
VStack{ | ||
Button("Outer Circle on") { | ||
stateChanger.setInput("CircleOuterState", value: true, path: "CircleOuter") | ||
} | ||
Button("Outer Circle off") { | ||
stateChanger.setInput("CircleOuterState", value: false, path: "CircleOuter") | ||
} | ||
Button("Inner Circle on") { | ||
stateChanger.setInput("CircleInnerState", value: true, path: "CircleOuter/CircleInner") | ||
} | ||
Button("Inner Circle off") { | ||
stateChanger.setInput("CircleInnerState", value: false, path: "CircleOuter/CircleInner") | ||
} | ||
} | ||
|
||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule rive-cpp
updated
from 3f9e94 to 41a693