TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Apache 2 |
ReleasedLast Release | Dec 2014 |
Maintained by Dalton Cherry.
Does the center slide view thing as seen in Path app.
Requires Quartz framework.
UINavigationController* navBar = [[UINavigationController alloc] initWithRootViewController:[[YourCenterViewController alloc] init]];
GPSlideOutViewController* slide = [DCSlideOutViewController slideOutController:navBar
left:[[YourLeftViewController alloc] init]
right:[[YourRightViewController alloc] init];
slide.leftViewIsSlideLength = YES;
self.window.rootViewController = slide;
then in your main view controller I recommend you add something like this:
self.navigationItem.leftBarButtonItem = [UIBarButtonItem customButtonWithImage:[UIImage imageNamed:@"show_sidebar"] target:self selector:@selector(openLeft)];
self.navigationItem.rightBarButtonItem = [UIBarButtonItem customButtonWithImage:[UIImage imageNamed:@"show_participants"] target:self selector:@selector(openRight)];
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-(void)openLeft
{
GPSlideOutViewController* slide = [DCSlideOutViewController currentSlide];
[slide showLeftView];
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-(void)openRight
{
GPSlideOutViewController* slide = [DCSlideOutViewController currentSlide];
[slide showRightView];
}
This framework requires at least iOS 5 above.
The recommended approach for installing DCSlideOutViewController is via the CocoaPods package manager, as it provides flexible dependency management and dead simple installation.
via CocoaPods
Install CocoaPods if not already available:
$ [sudo] gem install cocoapods
$ pod setup
Change to the directory of your Xcode project, and Create and Edit your Podfile and add RestKit:
$ cd /path/to/MyProject
$ touch Podfile
$ edit Podfile
platform :ios, '5.0'
pod 'DCSlideOutViewController'
Install into your project:
$ pod install
Open your project in Xcode from the .xcworkspace file (not the usual project file)
DCSlideOutViewController is license under the Apache License.