Latest 0.1.3
Homepage https://github.com/EricYellow/ScrollView
License MIT
Platforms ios 8.0
Authors

logo

CI Status
Version
License
Platform

Description

Replacement for UIScrollView.
You can you this scrollView as Multi-TableView’s containerView, it is compatible with UITableViews.

Example

import ScrollView

class ViewController: UIViewController {

    var scrollView:ScrollView!

    override func viewDidLoad() {
        super.viewDidLoad()

        configSubviews()
    }

}

extension ViewController {

    private func configSubviews(){

        let scrollFrame = CGRect(x:0,y:0,width:UIScreen.main.bounds.width,height:UIScreen.main.bounds.height)
        let subviewsCount = 3

        scrollView = ScrollView(frame:scrollFrame , contentSize: CGSize(width: scrollFrame.width * CGFloat(subviewsCount), height: scrollFrame.height))

        view.addSubview(scrollView)

        scrollView.scrollToPage = { page in
            let desc = "default horizontal scroll to page:(page.x)"
            print(desc)
        }

        for i in 0..<subviewsCount {

            let subVC = ViewController2()

            addChildViewController(subVC)
            scrollView.addChildView(subVC.view, index: i)
        }
    }

}

Installation

ScrollView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'ScrollView'

Author

[email protected]

License

ScrollView is available under the MIT license. See the LICENSE file for more info.


中文说明:

  • 当我们将UITableView放到UIScrollView上面时,经常会遇到手势冲突的问题, 这个自定义的ScrollView可以解决这个问题.

Latest podspec

{
    "name": "ScrollView",
    "version": "0.1.3",
    "summary": "a replacement for UIScrollView.",
    "description": "This framework is just a replacement for UIScrollView , you can use it as a container for multi-tableView",
    "homepage": "https://github.com/EricYellow/ScrollView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/EricYellow/ScrollView.git",
        "tag": "0.1.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ScrollView/Classes/**/*",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This