Commit 4a577b82 authored by pete谢兆麟's avatar pete谢兆麟

双击丝滑

parent 9e8f4d3b
...@@ -229,9 +229,7 @@ extension YHHomePageViewController : UITabBarControllerDelegate { ...@@ -229,9 +229,7 @@ extension YHHomePageViewController : UITabBarControllerDelegate {
let timestamp = CFAbsoluteTimeGetCurrent() let timestamp = CFAbsoluteTimeGetCurrent()
printLog(timestamp - self.tapTimestamp) printLog(timestamp - self.tapTimestamp)
if timestamp - self.tapTimestamp < doubleTapInterval { if timestamp - self.tapTimestamp < doubleTapInterval {
UIView.animate(withDuration: 0.25) { self.homeCollectView.setContentOffset(CGPoint(x: 0, y: -YHHomeHeadView.viewH), animated: true)
self.homeCollectView.contentOffset = CGPoint(x: 0, y: -YHHomeHeadView.viewH)//置顶功能
}
} }
self.tapTimestamp = timestamp self.tapTimestamp = timestamp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment