Skip to content

Commit

Permalink
Docs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
duncandoit committed Apr 15, 2022
1 parent 64f1fa4 commit d8aa490
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Example-iOS/Source/SwiftUI/SwiftMultipleAnimations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import SwiftUI
import RiveRuntime

/// This shows how to utilize one animation file to show content in different artboards and
/// different animations within those artboards
struct SwiftMultipleAnimations: DismissableView {
private let fileName = "artboard_animations"
var dismiss: () -> Void = {}
Expand Down
29 changes: 19 additions & 10 deletions Example-iOS/Source/UIkit/MultipleAnimations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,33 @@
import UIKit
import RiveRuntime

/// This shows how to utilize one animation file to show content in different artboards and
/// different animations within those artboards
class MultipleAnimationsController: UIViewController {
@IBOutlet weak var rviewSquareGoAround: RView!
@IBOutlet weak var rviewSquareRollAround: RView!
@IBOutlet weak var rviewCircle: RView!
@IBOutlet weak var rviewStar: RView!
var rSquareGoAround = RViewModel(RModel(fileName: "artboard_animations", artboardName: "Square", animationName: "goaround"))
var rSquareRollAround = RViewModel(RModel(fileName: "artboard_animations", artboardName: "Square", animationName: "rollaround"))
var rCircle = RViewModel(RModel(fileName: "artboard_animations", artboardName: "Circle"))
var rStar = RViewModel(RModel(fileName: "artboard_animations", artboardName: "Star"))

var rSquareGoAround = RViewModel(
fileName: "artboard_animations", artboardName: "Square", animationName: "goaround"
)
var rSquareRollAround = RViewModel(
fileName: "artboard_animations", artboardName: "Square", animationName: "rollaround"
)
var rCircle = RViewModel(
fileName: "artboard_animations", artboardName: "Circle"
)
var rStar = RViewModel(
fileName: "artboard_animations", artboardName: "Star"
)

override func viewDidLoad() {
super.viewDidLoad()
rSquareGoAround.configure(rview: rviewSquareGoAround)

rSquareRollAround.configure(rview: rviewSquareRollAround)

rCircle.configure(rview: rviewCircle)

rStar.configure(rview: rviewStar)
rSquareGoAround.setView(rviewSquareGoAround)
rSquareRollAround.setView(rviewSquareRollAround)
rCircle.setView(rviewCircle)
rStar.setView(rviewStar)
}
}

0 comments on commit d8aa490

Please sign in to comment.