Latest 1.0.5
Homepage https://github.com/keisukeYamagishi/ClimbBar
License MIT
Platforms ios 11.0
Authors

ClimbBar

[![](https://img.shields.io/apm/l/vim-mode.svg)](https://github.com/keisukeYamagishi/Direction/blob/master/LICENSE)
[![](https://img.shields.io/badge/twitter-brew__0__O-blue.svg)](https://twitter.com/brew_0_O)

Overview

iOS library that can extend a View that has scrollable elements such as UITableView and UIWebView.

As you can see in the example apps, the scroll bar hides the navigation bar.

travis status
result ClimbBar

Cocoapods

pod 'ClimbBar'

git clone

Via SSH: For those who plan on regularly making direct commits, cloning over SSH may provide a better experience (which requires uploading SSH keys to GitHub):

$ git clone [email protected]:keisukeYamagishi/Direction.git

Via https: For those checking out sources as read-only, HTTPS works best:

$ git clone https://github.com/keisukeYamagishi/Direction.git

Use it

Custom bar

ClimbBar uses contentInset to move the scroll elements, so

As in the picture below

Storyboard

ClimbBar

Code

self.scrollable.contentInsetAdjustmentBehavior = .never

Apple offical site

UIScrollView.ContentInsetAdjustmentBehavior
Constants indicating how safe area insets are added to the adjusted content inset.

Please use it as Never.

UIScrollView.ContentInsetAdjustmentBehavior (Apple)

BUT Look at the following

If you use UINavigationController, it will work without using it.

Sample code

override func viewDidLoad() {
        super.viewDidLoad()
        self.tableView.dataSource = self

        let conf = Configuration(range: UIApplication.shared.statusBarFrame.height..<UIApplication.shared.statusBarFrame.height + (self.navigationController?.navigationBar.frame.size.height)!)

        self.title = "ViewController"

        self.climbBar = ClimbBar(configurations: conf,
                                 scrollable: self.tableView,
                                 state: { (state) in
                                    self.navigationController!.setAlpha(alpha: CGFloat(state.alpha))
                                    self.navigationController?.navigationBar.frame = CGRect(x: 0,
                                                                                            y: state.originY,
                                                                                            width: self.view.frame.size.width,
                                                                                            height: 44)
        })
    }

Latest podspec

{
    "name": "ClimbBar",
    "version": "1.0.5",
    "summary": "You can move another object synchronously with the scroll value.",
    "description": "iOS library that can extend a View that has scrollable elements such as UITableView and UIWebView.",
    "homepage": "https://github.com/keisukeYamagishi/ClimbBar",
    "license": "MIT",
    "authors": {
        "keisuke": "[email protected]"
    },
    "source": {
        "git": "https://github.com/keisukeYamagishi/ClimbBar.git",
        "tag": "1.0.5"
    },
    "platforms": {
        "ios": "11.0"
    },
    "swift_versions": "5.0",
    "source_files": [
        "Source",
        "ClimbBar/*.swift"
    ],
    "swift_version": "5.0"
}

Pin It on Pinterest

Share This