Skip to content

Latest commit

 

History

History

Example-SwiftUI-Rive

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

[CN]CYLTabBarController Rive 动画示例(SwiftUI)

[EN]CYLTabBarController Rive animation demo (SwiftUI)

中文 English
本示例基于 Design+Code 课程「SwiftUI Animations」的最终工程(Meng To,Xcode Final)改造:课程中手写的 SwiftUI TabBar 换成了 CYLTabBarController(Navigation/TabBar.swift),5 个 Tab 的图标是课程 icons.riv 中的 Rive 画板。App 中其余的 Rive 动画(菜单按钮、侧边菜单图标、引导页按钮与背景、登录结果与彩带)也都通过本库的动画 API 播放(Components/RiveAnimation.swift),App 本身不直接调用 Rive API。说明见 docs/Rive-Animation.md。 This demo is the final project of Design+Code's "SwiftUI Animations" course (Meng To, Xcode Final), reworked: the course's hand-made SwiftUI tab bar is now a CYLTabBarController (Navigation/TabBar.swift), whose 5 tab icons are Rive artboards of the course's icons.riv. Every other Rive animation of the app (the menu button, the side menu icons, the onboarding button and background, the sign-in result and confetti) also plays through this library's animation API (Components/RiveAnimation.swift); the app calls no Rive API itself. See docs/Rive-Animation.md.
课程的 .riv 文件制作于 Rive 数据绑定出现之前,没有 view model,通过状态机输入、trigger 或线性动画播放,因此使用 Rive 子库的旧版运行时选项(.riveInput、.riveTriggerInput、.riveAnimation、.riveLegacyRuntime)。 The course's .riv files were made before Rive's data binding: they have no view model and play through state machine inputs, triggers or linear animations, so they use the Rive subspec's legacy runtime options (.riveInput, .riveTriggerInput, .riveAnimation, .riveLegacyRuntime).
SVGA(issue #415):Bell 页面上方的「Tab 图标来源」按钮把 5 个 Tab 图标切换为 Rive、SVGA(初始化 Key,Navigation/SVGATabIcons.swift)或 SVGA(配置文件 cyl_tabbar_configuration_svga.json),与 Rive 图标一一对应;SVGA 文件在 SVGAAssets/(Apache 2.0)。Podfile 同时引入 pod 'CYLTabBarController/SVGA'。见 docs/SVGA-Animation.md。 SVGA (issue #415): the "Tab icon source" button above the Bell page switches the 5 tab icons to Rive, SVGA (initialization keys, Navigation/SVGATabIcons.swift) or SVGA (the configuration file cyl_tabbar_configuration_svga.json), one for one with the Rive icons; the SVGA files are in SVGAAssets/ (Apache 2.0). The Podfile also brings pod 'CYLTabBarController/SVGA'. See docs/SVGA-Animation.md.
运行:在本目录执行 pod install,打开 AnimatedApp.xcworkspace(需要 iOS 15.0+)。RiveRuntime 由 pod 'CYLTabBarController/Rive' 引入,原工程中的 Swift Package 已移除。 To run: pod install in this folder, then open AnimatedApp.xcworkspace (iOS 15.0+). RiveRuntime comes with pod 'CYLTabBarController/Rive'; the original project's Swift package was removed.
来源与许可:课程代码、图片与 .riv 文件来自 Design+Code 公开下载的课程附件,压缩包中没有许可文件,版权归原作者所有;本仓库只保留最终工程,并做了上述修改。字体 Inter 与 Poppins 为 SIL Open Font License。 Source and license: the course's code, images and .riv files come from Design+Code's publicly downloadable course attachment, whose archive has no license file; the copyright stays with its author. This repository keeps only the final project, with the changes above. The Inter and Poppins fonts are under the SIL Open Font License.