Skip to content

Commit 1a89a32

Browse files
committed
Add animation to minimap.
#344 (comment)
1 parent 252cbf4 commit 1a89a32

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Shared/Samples/Animate 3D graphic/Animate3DGraphicView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ struct Animate3DGraphicView: View {
5959
.attributionBarHidden(true)
6060
.onSingleTapGesture { _, _ in
6161
// Show/hide full map on tap.
62-
isShowingFullMap.toggle()
62+
withAnimation(.default.speed(2)) {
63+
isShowingFullMap.toggle()
64+
}
6365
}
6466
.frame(width: isShowingFullMap ? nil : 100, height: isShowingFullMap ? nil : 100)
6567
.cornerRadius(10)

0 commit comments

Comments
 (0)