Latest 1.0.0
Homepage https://github.com/ltebean/LTSlidingViewController
License MIT
Platforms ios 7.0, requires ARC
Authors

LTSlidingViewController

Demo

LTSlidingViewController

LTSlidingViewController

Usage

Make your view controller extend LTSlidingViewController, in viewDidLoad:

self.animator = [[LTSlidingViewCoverflowTransition alloc] init]; // set the animator

UIViewController *vc1 = [self.storyboard instantiateViewControllerWithIdentifier:@"vc"];
UIViewController *vc2 = [self.storyboard instantiateViewControllerWithIdentifier:@"vc"];
UIViewController *vc3 = [self.storyboard instantiateViewControllerWithIdentifier:@"vc"];

[self addChildViewController:vc1];
[self addChildViewController:vc2];
[self addChildViewController:vc3];

Some useful methods you can call in your subclass controller:

- (void)scrollToPage:(NSInteger)page animated:(BOOL)animated;
- (void)removeAllChildViewControllers;
- (void)didScrollToPage:(NSInteger)page;
@end

And you can create custom transition by implementing LTSlidingViewTransition protocal:

@protocol LTSlidingViewTransition <NSObject>
- (void)updateSourceView:(UIView *)sourceView destinationView:(UIView *)destView withProgress:(CGFloat)progress direction:(SlideDirection)direction;
@end

See the example for details~

Latest podspec

{
    "name": "LTSlidingViewController",
    "version": "1.0.0",
    "summary": "sliding view controller allowing custom transition",
    "homepage": "https://github.com/ltebean/LTSlidingViewController",
    "license": "MIT",
    "authors": {
        "ltebean": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ltebean/LTSlidingViewController.git",
        "tag": "v1.0.0"
    },
    "source_files": "LTSlidingViewController/LTSlidingViewController.{h,m}",
    "requires_arc": true,
    "platforms": {
        "ios": "7.0"
    }
}

Pin It on Pinterest

Share This