https://github.com/douking/navigationtransition
Customize your navigation transition
https://github.com/douking/navigationtransition
navigationbar transition transition-animation
Last synced: about 1 year ago
JSON representation
Customize your navigation transition
- Host: GitHub
- URL: https://github.com/douking/navigationtransition
- Owner: DouKing
- License: other
- Created: 2016-08-04T06:47:54.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-03-11T11:29:12.000Z (over 5 years ago)
- Last Synced: 2025-01-18T09:25:13.947Z (over 1 year ago)
- Topics: navigationbar, transition, transition-animation
- Language: Objective-C
- Homepage:
- Size: 340 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://996.icu)
[](https://github.com/996icu/996.ICU/blob/master/LICENSE)
# NavigationTransition
Some categories that can be used to customize your navigation transition.
- customize transition animate
- customize navigation bar when transition
- support fullscreen interactive pop gesture
- support Storyboard
## Install
Add the followwing line to your Podfile:
```
pod 'NavigationTransition'
```
## Usage
Set the navigationTransitionStyle property for UINavigationController to customize the transition for all view controllers in the navigation.
```
DemoViewController *vc = [[DemoViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithNavigationBarClass:STMNavigationBar.class toolbarClass:nil];
nav.viewControllers = @[vc];
nav.navigationTransitionStyle = STMNavigationTransitionStyleSystem;
[self presentViewController:nav animated:YES completion:nil];
```
You can also set the navigationTransitionStyle property for a single UIViewController to customize the only one vc.
```
DemoViewController *vc = [[DemoViewController alloc] init];
if (self.navigationController.viewControllers.count == 3) {
vc.navigationTransitionStyle = STMNavigationTransitionStyleResignLeft;
}
[self.navigationController pushViewController:vc animated:YES];
```
And you can customize a transition use yourself Class.
```
- (id)navigationController:(UINavigationController *)navigationController animationControllerForOperation:(UINavigationControllerOperation)operation fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC {
CustomTransition *transition = [[CustomTransition alloc] init];
transition.operation = operation;
return transition;
}
```
Download the project and see the detail.
## Blog
https://douking.github.io/2018/01/01/navigation-transition/
## License
See file `LICENSE.MIT` and `LICENSE.NPL`.