Skip to content

sinorychan/DouYinLikeAnimation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DouYinLikeAnimation

仿写抖音双击点赞动画 红心点赞动画

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
    /// 处理触摸事件 处理单击冲突问题
    guard let touch = (touches as NSSet).anyObject() as? UITouch else {return}
    if touch.tapCount <= 1 {
        super.touchesBegan(touches, with: event)
    } else {
        //双击飘心 💗💗
        DouYiLikeAnimation.startWithTouch(touches)
        //红心点赞动画 💥 
        likeView.startAnimationWithIsLike(true)
    }
}


/// 系统的触摸事件 touch
///
/// - Parameter touches:
internal static func startWithTouch(_ touches: Set<UITouch>)

/// 点击触发动画
///
/// - Parameter tap:
internal static func startAnimationWithTap(_ tap: UITapGestureRecognizer)

Image text

About

仿写抖音双击点赞动画 红心点赞动画

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages