Marking properties as 'State' will trigger a new snapshot of your view each time they’re modified. These can be automatically interpolated by SwiftUI!
---
Join the Ray Wenderlich community here: [ Ссылка ]
---
About this course:
Get started animating all sorts of SwiftUI views, including shapes, fades, transitions, and interacting with animation!
This course is part of our iOS User Interfaces with SwiftUI learning path. You're ready for this course if you're working through that learning path in order, or you're someone who has a bit of iOS and Swift experience: enough to know the basics of putting views onscreen in a SwiftUI-based app.
This course isn’t suited for advanced developers. If that’s you, check out our advanced video courses for more ways to level-up your developer skills!
---
From Apple's Human Interface Guidelines:
Beautiful, subtle animation throughout iOS builds a visual sense of connection between people and content onscreen. When used appropriately, animation can convey status, provide feedback, enhance the sense of direct manipulation, and help users visualize the results of their actions.
Use animation and motion effects judiciously. Don’t use animation for the sake of using animation. Excessive or gratuitous animation can make people feel disconnected or distracted, especially in apps that don’t provide an immersive experience. iOS uses motion effects, such as a parallax effect, to create the perception of depth on the Home screen and in other areas. These effects can increase understanding and enjoyment, but overusing them can make an app feel disorienting and difficult to control. If you implement motion effects, always test the results to make sure they work well.
Strive for realism and credibility. People tend to accept artistic license, but they can feel disoriented when movement doesn’t make sense or appears to defy physical laws. If someone reveals a view by sliding it down from the top of the screen, for example, they should be able dismiss the view by sliding it back up.
Use consistent animation. A familiar, flowing experience keeps users engaged. They're accustomed to the subtle animation used throughout iOS, such as smooth transitions, fluid changes in device orientation, and physics-based scrolling. Unless you’re creating an immersive experience, such as a game, custom animation should be comparable to the built-in animations.
Make animations optional. When the option to reduce motion is enabled in accessibility preferences, your app should minimize or eliminate application animations. For guidance, see Motion.
Ещё видео!