ARSlidingPanel is an iOS framework that allows to use 'Google Play Music-like' sliding-up panel in your application.
iOS 6.0 and later
ARSlidingPanel is compatible with ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates:
You will need the latest developer tools in order to build ARSlidingPanel. Old Xcode versions might work, but compatibility will not be explicitly maintained.
CocoaPods is the recommended way to add ARSlidingPanel to your project.
Add a pod entry for ARSlidingPanel to your Podfile:
Install the pod(s) by running pod install.
Include ARSlidingPanel wherever you need it with #import "ARSPContainerController.h".
Alternatively you can directly add
source files to your project
There are two ways to add ARSlidingPanel to your project.
1) Drag and drop View Controller from your Xcode Object Library on the storyboard
2) Set it's class to ARSPContainerController:
3) Add custom segue from ARSPContainerController to the view controller, that will be your Main View Controller. Set segue's identifier to ARSPMainViewControllerSegue Set segue's class to ARSPMainViewControllerSegue
4) Add custom segue from ARSPContainerController to the view controller, that will be your Panel View Controller. Set segue's identifier to ARSPPanelViewControllerSegue Set segue's class to ARSPPanelViewControllerSegue
5) Set visible zone height, enable dragging, customize behavior, animation speed, shadow etc. and play around!
1) Create object of class ARSPContainerController and init it with [ARSPContainerController getController] function
2) Set it's mainViewController
3) Set it's panelViewController
4) Set visible zone height, enable dragging, customize behavior, animation speed, shadow etc. and play around!
ARSPContainerController *containerController = [ARSPContainerController getController]; UIViewController *mainVC = [[UIViewController alloc]init]; [mainVC.view setBackgroundColor:[UIColor blueColor]]; UIViewController *panelVC = [[UIViewController alloc]init]; [panelVC.view setBackgroundColor:[UIColor yellowColor]]; containerController.mainViewController = mainVC; containerController.panelViewController = panelVC; containerController.visibleZoneHeight = 80; containerController.draggingEnabled = YES;
ARSPContainerController - is a main class of ARSlidingPanel framework. It's a container for two controllers:
mainViewController - could be any custom view controller, navigation controller etc.
panelViewController - view controller inside panel. Could be any custom view controller, navigation controller etc.
After integration state you can customize behavior of ARSPContainerController.
###Example:### // setting height of panel in minimized(docked) mode containerController.visibleZoneHeight = 80; // setting height of zone where you can swipe down to close(minimize) your panel view controller containerController.swipableZoneHeight = 130; // enable dragging of panel view controller containerController.draggingEnabled = YES;
Please refer to 'ARSPContainerController.h' file to see all available settings
There are functions to show/hide/close panel view controller:
Also you can add your custom animations to be executed during showing/hiding/closing ...
You can set your own object as one of delegates of ARSPContainerController:
visibilityStateDelegate - subscribes to track Visibility State changes of Panel View Controller:
Please refer to 'ARSPVisibilityState.h' to see list of all Visibility States
dragDelegate - subscribes to track dragging of Panel View Controller