Skip to content

viewDidAppear/BDScrollBar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BDScrollBar

An old-style scroll bar for modern iOS apps.

BDScrollBar_hero

GitHub license Platform CocoaPods Twitter Blog


BDScrollBar is a "Classic macOS" inspired UI component, which can be added to UIScrollView instances. Why? Because! That's why! It is as performant as possible, but serves no real purpose other than to be as unfashionable as possible. Have fun!

  • It also includes a modern style so it has a LITTLE BIT more usefulness.

Features

  • Finely scroll the entire content.
  • Hooks into UIScrollView via KVO and the Obj-C Runtime.
  • Animates like the standard scroll indicators - including bounce!
    • Turn off the bounce for added vintage effect!
  • Tap the scroll bar track to jump down the content.
  • Supports the "Taptic" feedback engine.

Usage

BDScrollBar adds itself directly to the scroll view. It will not appear above or below. 🙌

// Make
let scrollBar = BDScrollBar()

// Add
tableView.bd_addScrollBar(scrollBar)

// Adjust right edge
tableView.separatorInset = scrollBar.adjustedSeparatorInsets(for: self.tableView.separatorInset)

The separator insets and the layout margins of the table view can be adjusted so nothing underlaps the scroll bar.

Installation & Compatibility

BDScrollBar will work with iOS 15 and above. It supports Swift only.

Manual (aka Tried & True)

Download the repo and add it into your Xcode project.

CocoaPods

pod 'BDScrollBar'

Why? WHY?

No reason. Have fun!

Credits

BDScrollBar was created by Benjamin Deckys

License

BDScrollBar is available under the MIT license. Please see the LICENSE file for more information.