mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-04-10 03:03:47 +02:00
Update README.md
This commit is contained in:
20
README.md
20
README.md
@@ -56,7 +56,7 @@ Also include:
|
|||||||
|
|
||||||
<img align="left" src="https://hsto.org/webt/xh/3t/eq/xh3teq68fx1bujdlsgpon4jtijo.gif" width="280">
|
<img align="left" src="https://hsto.org/webt/xh/3t/eq/xh3teq68fx1bujdlsgpon4jtijo.gif" width="280">
|
||||||
|
|
||||||
#### Gester, Animation, 3D
|
#### Gester
|
||||||
|
|
||||||
In class add property:
|
In class add property:
|
||||||
|
|
||||||
@@ -74,6 +74,24 @@ To card add `gester` and `offset`:
|
|||||||
.gesture(dragGester)
|
.gesture(dragGester)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### 3D
|
||||||
|
|
||||||
|
For add 3D rotation for back cards use code:
|
||||||
|
|
||||||
|
```swift
|
||||||
|
.rotation3DEffect(Angle(degrees: dragState.isActive ? 0 : 60), axis: (x: 10.0, y: 10.0, z: 10.0))
|
||||||
|
```
|
||||||
|
|
||||||
|
For medium card use 30 angles.
|
||||||
|
|
||||||
|
#### Animation
|
||||||
|
|
||||||
|
In preview I am use Spring animation for all cards:
|
||||||
|
|
||||||
|
```swift
|
||||||
|
.animation(.spring())
|
||||||
|
```
|
||||||
|
|
||||||
#### Transition And Blur
|
#### Transition And Blur
|
||||||
|
|
||||||
<img src="Resources/TransitionBlur.png" width="700">
|
<img src="Resources/TransitionBlur.png" width="700">
|
||||||
|
|||||||
Reference in New Issue
Block a user