catransition

iPhone - UINavigationController - custom animation with CATransaction

对着背影说爱祢 提交于 2019-12-03 20:34:30
I am trying to create a category for UINavigationController so I can put together a few custom animations. I came across this question and it got me started. I've come up with the following for a push function: - (void)pushViewControllerMoveInFromBottom:(UIViewController *)viewController { [CATransaction begin]; CATransition *transition; transition = [CATransition animation]; transition.type = kCATransitionMoveIn; transition.subtype = kCATransitionFromBottom; transition.duration = 0.7; [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; [[[[self.view subviews]

How to animate removeFromSuperview

淺唱寂寞╮ 提交于 2019-12-03 06:28:49
I animated the appearance of my subview with: CATransition *transition = [CATransition animation]; transition.duration = 0.3; transition.type = kCATransitionReveal; [webView.layer addAnimation:transition forKey:nil]; [self.view addSubview:webView]; But now I want to remove my subView. How can I add animation to do this? Like other CATransition? When to add this? Before or after addSubview? Krishnabhadra Well you could do the animation first and on the animationEndListener call removeFromSuperView [UIView animateWithDuration:0.5 delay:1.0 options: UIViewAnimationOptionCurveEaseOut animations:^{

Low frame rate during UINavigationController push transition

谁都会走 提交于 2019-12-01 11:35:33
I have a UINavigationController , and push from the root view controller to the next view controller. This second view controller is fairly "heavy", in that it has a great deal of initialization and subviews. My issue is this: the transition animation performs terribly. Basically, the animation suffers from a very low frame rate (I get maybe 3-4 frames in total out of the "push" animation). I've tried a variety of different techniques, including two different methods to manually animate the transition. In all cases, the first 0.4-0.7 seconds of the animation suffers from this poor framerate.

Low frame rate during UINavigationController push transition

天大地大妈咪最大 提交于 2019-12-01 09:42:15
问题 I have a UINavigationController , and push from the root view controller to the next view controller. This second view controller is fairly "heavy", in that it has a great deal of initialization and subviews. My issue is this: the transition animation performs terribly. Basically, the animation suffers from a very low frame rate (I get maybe 3-4 frames in total out of the "push" animation). I've tried a variety of different techniques, including two different methods to manually animate the

View being blocked by UITransitionView after being presented

北城以北 提交于 2019-11-30 06:45:10
I have a side navigation controller and present it via a UIButton. When I make this NC the root view controller directly by [self presentviewcontroller: NC animated: YES completion: nil] , some reason the menu side of the NC is blocked by a UITransitionView that I cannot get to disappear. I've attached an image of the . is another. I have tried the following: UIWindow *window = [(AppDelegate *)[[UIApplication sharedApplication] delegate] window]; window.backgroundColor = kmain; CATransition* transition = [CATransition animation]; transition.duration = .5; transition.timingFunction =

Linker command failed with Undefined symbols for architecture i386

时光毁灭记忆、已成空白 提交于 2019-11-29 12:55:39
问题 i am trying to do the half page curl feature. This is the code I am using: #import <QuartzCore/QuartzCore.h> CATransition *animation = [CATransition animation]; [animation setDelegate:self]; [animation setDuration:1.0f]; [animation setTimingFunction:UIViewAnimationCurveEaseInOut]; [animation setType:(notCurled ? @"mapCurl" : @"mapUnCurl")]; [animation setRemovedOnCompletion:NO]; [animation setFillMode: @"extended"]; [animation setRemovedOnCompletion: NO]; notCurled = !notCurled; But I

how does the CATransition work?

孤街浪徒 提交于 2019-11-29 12:24:52
i have two views,one is aView,another is bView, there is a button on aView,i click the button ,i will jump to bView,please see the code -(IBAction)jump2b:(id)sender{ CATransition *animation = [CATransition animation]; animation.delegate = self; animation.duration = 0.25f; animation.timingFunction = UIViewAnimationCurveEaseInOut; animation.fillMode = kCAFillModeForwards; animation.removedOnCompletion = NO; animation.type = kCATransitionPush; animation.subtype = kCATransitionFromTop; [bView.view.layer addAnimation:animation forKey:@"animation"]; } it can not work well,it can jump,so what can i

Custom segue transition animation

回眸只為那壹抹淺笑 提交于 2019-11-28 14:13:04
I'm working on an app that utilizes the navigation controller. I have a certain view controller that has a left and right button in the navigation bar and each button segues to a different view controller. When I press the right button, I just call self.performSegue(withIdentifier: "ToDestination", sender: nil) and when I pop back I call _ = self.navigationController?.popViewController(animated: true) . My issue is when I press the left button. I can push and pop, but I want the transition to work opposite of the right button. Since I'm pressing the left button, I want the segue to transition

how does the CATransition work?

…衆ロ難τιáo~ 提交于 2019-11-28 05:47:52
问题 i have two views,one is aView,another is bView, there is a button on aView,i click the button ,i will jump to bView,please see the code -(IBAction)jump2b:(id)sender{ CATransition *animation = [CATransition animation]; animation.delegate = self; animation.duration = 0.25f; animation.timingFunction = UIViewAnimationCurveEaseInOut; animation.fillMode = kCAFillModeForwards; animation.removedOnCompletion = NO; animation.type = kCATransitionPush; animation.subtype = kCATransitionFromTop; [bView

dismissModalViewController with transition: left to right

爷,独闯天下 提交于 2019-11-28 05:02:46
I was using a nice method to dismiss my modal view controller: [self dismissModalViewControllerWithTransition:2]; which makes a slide transition from left to right, like a navigation controller does to pop a view. As this method is a non-public method, apple will not accept it. How can I program this kind of animation in my code (slide from left to right, to dismiss a modal view, and slide from right to left to present a modal view) ? Thanks in advance I have accepted the answer from Safecase, but I would like to publish my final solution here: 1) To present a modal view controller with a from