草庐IT

GPU动画

全部标签

ios - 动画运行时在 iOS 应用程序的主线程上暂停执行

我正在使用导航Controller,并且我正在尝试在新ViewController推送之前运行动画。为此,我从UINavigationController委托(delegate)中捕获事件,并运行动画。也就是说,显然iOS动画是异步运行的,所以方法返回,我的动画与标准推送动画同时运行。关于如何解决这个问题有什么想法吗?情况是这样的:-(void)navigationController:(UINavigationController*)navigationControllerwillShowViewController:(UIViewController*)viewController

ios resignFirstResponder 重置动画

首先为我糟糕的英语感到抱歉!!在我的应用程序中有一个UIViewController并且UIView在subViewLogin中被称为subViewLogin有2个UITextField被称为用户名和密码。当我的应用程序运行时subViewLogin被UIViewAnimationCurveLinear移动到位置。但是当我完成编辑UITextField(调用resignFirstResponder)时subViewLogin卷土重来定位。为什么?我怎样才能防止subViewLogin重新定位?这是我的代码。//LoginViewController.h#import@interface

ios - UITextField 丢失 firstResponder 恢复帧动画/修改

我使用以下代码修改框架大小以适应显示/消失的键盘:-(void)moveCodeViewForKeyboard:(NSNotification*)aNotificationup:(BOOL)up{NSDictionary*userInfo=[aNotificationuserInfo];NSTimeIntervalanimationDuration;UIViewAnimationCurveanimationCurve;CGRectkeyboardEndFrame;[[userInfoobjectForKey:UIKeyboardAnimationCurveUserInfoKey]get

ios - 每当 admob 收到广告时,cocos2dx 动画就会滞后

我在我的cocos2dx(v2.0.4)游戏场景中运行流畅的CCScaleToAction。将admob(v6.2.1)添加到cocos2dx的openGLView后,只要admob收到新广告,操作就会滞后。我测试了两种情况:从View层次结构中删除广告View。admobloadRequst:时动画滞后注释掉admobloadRequest:并将广告View添加回View层次结构。动画在游戏场景加载的前几秒滞后。这似乎与UIKit和cocos2dx集成问题有关。有解决方法吗? 最佳答案 想到的技巧是:不要让AdMob处理自己的显示

iphone - 动画 NavigationController 过渡没有动画导航栏

我有一个带有导航Controller的典型iOS应用程序。顶部的导航栏有左右按钮,在不同的View中保持相同,所以我只想为当前View而不是顶部栏设置动画。我不确定如何开始。 最佳答案 我有个主意。首先,在主视图顶部添加自定义导航栏。其次,在导航栏下添加一个navigationController作为subview。现在,如果navigationController执行推送或弹出操作,您的导航栏将不会发生任何变化。 关于iphone-动画NavigationController过渡没有动

ios - 为什么隐式动画会覆盖我的 CABasicAnimation?

每次用户做某事时,我都会尝试将CALayer移动几个点。我将动画设置为运行相对较慢,但是当我在设置动画后设置图层的位置时,隐式动画似乎接管并快速执行动画。这基本上是我的代码的样子:CGPointpoint=CGPointMake(layer.position.x+30,layer.position.y+30);CABasicAnimation*animation=[CABasicAnimationanimationWithKeyPath:@"position"];animation.fromValue=[NSValuevalueWithCGPoint:layer.position];a

ios - UIView 在设备旋转后停止动画

我有一些View和ImageView。_contentView=[[UIViewalloc]initWithFrame:self.bounds];_contentView.autoresizingMask=UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;....UIImageView*imageView=[[UIImageViewalloc]initWithImage:someImage];[_contentViewaddSubview:imageView];这个imageView运行一些动画。[UIVi

iphone - 使用 CAAnimation 检测正在动画的 uiview subview 的触摸

我正在尝试检测动画View的UISubview上的触摸这是我的检测代码://simplebutnotveryelegantwayofgettingcorrectframeCGRectkeepFrame=self.fishContainer.layer.frame;self.fishContainer.layer.frame=[[self.fishContainer.layerpresentationLayer]frame];//gettouchlocation,takingpresentationlayerintoaccount.(Seeabove)CGPointp=[senderlo

ios - 停止GIF动画

我在这里使用uiimage-from-animated-gif通过UIImage显示动画GIF的库。它正在运行,但我需要在完成一圈后停止动画imageView。以下代码:NSURL*url=[[NSBundlemainBundle]URLForResource:@"dove-animate"withExtension:@"gif"];self.imageView.image=[UIImageanimatedImageWithAnimatedGIFData:[NSDatadataWithContentsOfURL:url]];提前致谢。 最佳答案

ios - iOS 8 中 UIKeyboardWillShowNotification 事件的动画 View

我正在使用以下代码根据键盘移动为View的位置设置动画。该代码在iOS7下运行良好,但在iOS8下会导致奇怪的行为:[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(keyboardWillShow:)name:UIKeyboardWillShowNotificationobject:nil];-(void)keyboardWillShow:(NSNotification*)aNotification{NSDictionary*keyboardInfo=[aNotificationuserInf