BNSlidingViewController is a Swift controller mimics the player overlay in iTunes iOS app. Created by Ben Nagar.
- Xcode 7.2
- iOS 7.0+
Just add BNSlidingViewController.swift to your project.
- Create your
SlidingPanelViewControllerand make it implementSlidableprotocol
collapsedViewneed to be your ViewController's viewexpandedViewneed to be external view, NOT subview of you collapsedView (you can see easy way to do it in the demo project)
- Create your
MainViewControllersubclassingBNSlidingViewController
- in
viewDidLoad()get your SlidingPanel and pass it tosetup()
- you can override this method in your
MainViewControllerto handle state changes
override func didChangeState(newState: SliderState) {
super.didChangeState(newState)
//change you view according to the new state
}BNSlidingViewController is available under the MIT license. See the LICENSE file for more info.
Follow on Twitter ✨CodeLetter ✎ ✨

