- Easy use!
- Universal – iPhone & iPad, including 4 inch screens
- Utilises Child View Controllers – Supports UINavigationControllers, etc.
- Correct physics – tracks your finger and calculates the animation properly
- Peek or Reveal modes
- Resize or Slide Top view – Note that the animations for shadows and navigation bars don't work properly with resizing.
- Under view controllers can slide with top view or be static underneath
- Can force one side to always be shown in Landscape or both orientations
- Objective-C ARC
- Xcode 4.4 or above
- iOS 5 or above
Once you have got the source, you can install the component in two ways.
- Drag the ADSlidingViewController.xcodeproj file into your xcode project. Make sure that it is not open in another window
- Click on the project settings and navigate to the target you wish to install for. Click build phases. Add ADSlidingViewController to your 'Target Dependencies'.
- Add the following to 'Link Binary With Libraries': (If not already)
- libADSlidingViewController
- QuartzCore
- Go to the 'Build Setting' tab. Add '-ObjC' and '-all_load' to 'Other Linker Flags'
- Add the repository's file directory to 'User Header Search Paths'
- Drag ADSlidingViewController.h and .m into your project.
- Add QuartzCore to 'Link Binary With Libraries' in your target's 'Build Phases' (If not already)
- If you're not using ARC, add -f-objc-arc to ADSlidingViewController.h's compiler flags. (In 'Build Phases' -> 'Compile Sources'
- Create an instance of an ADSlidingViewController (can be a subclass if you wish), from a XIB, Storyboard or just using initWithFrame
- Set the main/left/right view controllers. Note that the left/right views are not both required.
- Customise the component to your liking, and add the pan gesture to whichever view you wish.
- Make sure the component is added to the screen
For sample code, check out the demo, included with the repository