Need help with LTSlidingViewController?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

ltebean
123 Stars 24 Forks Other 11 Commits 1 Opened issues

Description

sliding view controller allowing custom transition

Services available

!
?

Need anything else?

Contributors list

No Data

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 
- (void)updateSourceView:(UIView *)sourceView destinationView:(UIView *)destView withProgress:(CGFloat)progress direction:(SlideDirection)direction;
@end

See the example for details~

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.