在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):takuoka/PullToBounce开源软件地址(OpenSource Url):https://github.com/takuoka/PullToBounce开源编程语言(OpenSource Language):Swift 83.2%开源软件介绍(OpenSource Introduction):PullToBounceAnimated "Pull To Refresh" Library for UIScrollView. You can add animated "pull to refresh" action to your UIScrollView, UITableView and UICollectionView. Inspired by https://dribbble.com/shots/1797373-Pull-Down-To-Refresh ScreenShotYou can play demo at appetize.io. InstallationYou can install this to your project via CocoaPods.
UsagePlease Wrap your scroll view// Please wrap your scroll view
tableView.frame = yourFrame
let tableViewWrapper = PullToBounceWrapper(scrollView: tableView)
// Please add wrapper view to your view instead of your scroll view.
bodyView.addSubview(tableViewWrapper) The frame of wrapper will be same as your scrollView. And the color will be same as your scrollView's background color. Event HandlertableViewWrapper.didPullToRefresh = {
didFinishYourLoading() {
tableViewWrapper.stopLoadingAnimation()
}
} Custom AnimationDefault arguments of "init" of PullToBounceWrapperinit(
scrollView: UIScrollView, // this is the only required argument
bounceDuration: CFTimeInterval = 0.8,
ballSize:CGFloat = 36,
ballMoveTimingFunc: CAMediaTimingFunction = CAMediaTimingFunction(controlPoints:0.49,0.13,0.29,1.61),
moveUpDuration: CFTimeInterval = 0.25,
pullDistance: CGFloat = 96,
bendDistance: CGFloat = 40,
didPullToRefresh: (()->())? = nil
) You can use these arguments to customize animation. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论