






7 张图片
作者
描述
使用 SwiftUI 的脉冲按钮动画
我创建了 PJRPulseButton,该控件将为按钮生成脉冲动画。还提供了一个示例。它很简单,你可以在任何类中使用 PJRPulseButton 文件,就像 PJRPulseButton() 一样。它将创建默认的按钮动画,带有加号按钮图像。
https://user-images.githubusercontent.com/5228713/112018520-a6fc5300-8b54-11eb-90ac-fd66d751a98e.mov
你可以使用不同的颜色、图像、动画持续时间、按钮大小和外部圆圈数量来自定义它。
例子:PJRPulseButton(color: Color.red, systemImageName: "heart.circle.fill", buttonWidth: 48, numberOfOuterCircles: 2, animationDuration: 1)