CocoaPods trunk is moving to be read-only. Read more on the blog, there are 10 months to go.
| TestsTested | ✓ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Apr 2017 |
| SwiftSwift Version | 3.0 |
| SPMSupports SPM | ✗ |
Maintained by liyang.
KBScrollMagic is a solution for the gesture conflict between multiple scrollView when we have some scrollViews or tableViews that added to a superview that is also scrollView. Easy to use!
ScrollView嵌套时,相同方向时的手势冲突的解决方案
To run the example project, clone the repo, and run pod install from the Example directory first.
KBScrollMagic is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "KBScrollMagic"easy use!
call the follow code at your scrollView that it’s a subview of another scrollView
// superScrollView: 外层的ScrollView
// insetY: 上边部分的高度
// delegate: SuperScrollView有下拉刷新时,建议实现此代理
tableView.kbs.set(superScrollView: <UIScrollView>, insetY: <CGFloat>, delegate: <KBScrollMagicDelegate>)OR
tableView.kbs.setSuperScrollView(<UIScrollView>)
tableView.kbs.setinsetY(<CGFloat>)if the SuperScrollView need to PullToRefresh, implement the following code SuperScrollView有下拉刷新时,建议实现此代理
tableView.kbs.setDelegate(<KBScrollMagicDelegate>)
//protocol KBScrollMagicDelegate
func scrollMagicDidEndDrag(when superScrollView: UIScrollView, offSetY: CGFloat){
// call the RefreshCode
}
Kirito, [email protected]
KBScrollMagic is available under the MIT license. See the LICENSE file for more info.