Skip to content

Commit 183546c

Browse files
committed
More fruits!
1 parent b617951 commit 183546c

File tree

1 file changed

+10
-3
lines changed
  • SwiftGen.playground/Pages/XCAssets-Demo.xcplaygroundpage

1 file changed

+10
-3
lines changed

SwiftGen.playground/Pages/XCAssets-Demo.xcplaygroundpage/Contents.swift

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,19 @@ let image1 = UIImage(asset: Asset.Food.Exotic.banana)
8888
let image2 = Asset.Food.Round.tomato.image
8989

9090
import PlaygroundSupport
91-
// Show alternating tomato and banana in playground's liveView
91+
// Show fruits animated in the playground's liveView
9292
PlaygroundPage.current.liveView = {
93-
let assets = [Asset.Food.Round.tomato, Asset.Food.Exotic.banana]
93+
let assets = [
94+
Asset.Food.Exotic.banana,
95+
Asset.Food.Exotic.mango,
96+
Asset.Food.Round.apricot,
97+
Asset.Food.Round.apple,
98+
Asset.Food.Round.tomato,
99+
Asset.Food.Round.Double.cherry
100+
]
94101
let iv = UIImageView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
95102
iv.animationImages = assets.map(\.image)
96-
iv.animationDuration = 2
103+
iv.animationDuration = TimeInterval(assets.count)/2 // 0.5s per image
97104
iv.startAnimating()
98105
return iv
99106
}()

0 commit comments

Comments
 (0)