Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yigitozt/viewslidetransition
Slide between two view
https://github.com/yigitozt/viewslidetransition
animate animation between controller easy-to-use finger navigation-controller objective-c slide swipe view viewcontroller xcode xcode-plugin
Last synced: about 2 hours ago
JSON representation
Slide between two view
- Host: GitHub
- URL: https://github.com/yigitozt/viewslidetransition
- Owner: yigitozt
- License: mit
- Created: 2014-03-14T13:21:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-03-14T14:00:04.000Z (over 10 years ago)
- Last Synced: 2023-08-19T01:52:54.794Z (over 1 year ago)
- Topics: animate, animation, between, controller, easy-to-use, finger, navigation-controller, objective-c, slide, swipe, view, viewcontroller, xcode, xcode-plugin
- Language: Objective-C
- Size: 141 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ViewSlideTransition
===================
Slide between two view-Slides smoothly between two views and rotates an view in scene(optional).
Instructions(for 4' retina screen, you can change the values for other screens)
You have to use navigation controllerIn Storyboard
- Add a view first, let say it mainBigView (frame: 0,0,640,568)
- Add 2 views in the mainBigView and name them view1, view2 (frameforview1: 0,0,320,568) (frameforview2: 320,0,320,568)
- Add a view between two views inside of mainBigView. This is for rotating animation while transition.(optional)
- Now specify them in the ViewController's .h file.
- Let's say them mainBigView,firstView,secondView,rotatingObjectCode
1-Add a gesture recognizer in the ViewController
@property(strong, nonatomic)UILongPressGestureRecognizer * tapGesture;
2-Initialize the recognizer in viewDidLoad
self.tapGesture = [UILongPressGestureRecognizer new];
[self.tapGesture addTarget:self action:@selector(tapScreen:)];
self.tapGesture.minimumPressDuration = 0.001f;
[self.view addGestureRecognizer:self.tapGesture];
3-Write down the tapScreen method- (IBAction)tapScreen:(id)sender
{
}
4- Add the makeAnimatedCrossFadeWithFirstView method inside
[Storage makeAnimatedCrossFadeWithFirstView:<#(UIView *)#> secondView:<#(UIView *)#> mainBigView:<#(UIView *)#> rotatingObject:<#(UIView *)#> currentView:<#(UIView *)#> currentController:<#(UIViewController *)#> currentLongPressGesture:<#(UILongPressGestureRecognizer *)#> makeNavigationBarDissappear:<#(BOOL)#>];
5- Now fill the areas with views that we specified before. If you have no rotating object, you can write nil.[Storage makeAnimatedCrossFadeWithFirstView:self.firstView secondView:self.secondView mainBigView:self.mainBigView rotatingObject:self.rotatingObject currentView:self.view currentController:self currentLongPressGesture:self.tapGesture makeNavigationBarDissappear:YES];