Tag: catransition

CATransition到其他视图工作,在转换回崩溃

我正在使用此代码从当前视图转换到另一个,它的工作原理。 问题是,当我尝试返回到当前视图的应用程序崩溃。 这是我用来从当前视图传递给新的代码: CATransition *transition = [CATransition animation]; transition.duration = 0.75; // using the ease in/out timing function transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; transition.type = kCATransitionReveal; transition.subtype = kCATransitionFromRight; transition.delegate = self; // Next add it to the containerView's layer. This will perform the transition based on how we change its contents. [self.view.layer addAnimation:transition forKey:nil]; // […]

被呈现后被UITransitionView阻止的视图

我有一个侧面导航控制器,并通过UIButton呈现。 当我通过[self presentviewcontroller: NC animated: YES completion: nil]直接将这个NC视图控制器作为根视图控制器[self presentviewcontroller: NC animated: YES completion: nil] ,由于某种原因,NC的菜单端被一个UITransitionView阻塞,我无法消失。 我附上了一张图片 。 是另一个。 我已经尝试了以下内容: UIWindow *window = [(AppDelegate *)[[UIApplication sharedApplication] delegate] window]; window.backgroundColor = kmain; CATransition* transition = [CATransition animation]; transition.duration = .5; transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; transition.type = kCATransitionPush; transition.subtype = kCATransitionFromTop; [nc.view.layer addAnimation:transition forKey:kCATransition]; [UIView transitionWithView:window duration:0.5 options:UIViewAnimationOptionTransitionNone […]

如何animationremoveFromSuperview

我用下面的animation显示了我的子视图: CATransition *transition = [CATransition animation]; transition.duration = 0.3; transition.type = kCATransitionReveal; [webView.layer addAnimation:transition forKey:nil]; [self.view addSubview:webView]; 但是现在我想删除我的子视图。 我如何添加animation来做到这一点? 像其他的CATransition一样? 什么时候添加这个? 在addSubview之前或之后?