Tag: animation

CoreAnimation警告删除线程与未提交的CATransaction

我遇到以下警告的问题: CoreAnimation:警告,删除线程与未提交的CATransaction; 在环境中设置CA_DEBUG_TRANSACTIONS = 1以logging回溯。 我正在使用一个NSOperation对象来执行一些计算,一旦完成它发送消息回到AppDelegate,然后隐藏进度条,并取消隐藏一些button。 如果我将消息注释回AppDelegate,警告消失,但进度条显然保持可见和animation状态。 我正在使用xCode 4.4.1和OSX 10.8.1,但是,当我在OSX 10.7.4上使用相同版本的xCode编译和运行代码时,我没有得到警告,代码按预期运行。 设置CA_DEBUG_TRANSACTIONS = 1环境variables显示来自AppDelegate中的NSControl setEnabled消息的回溯。 答案可能是在面对我,但也许我有太多的咖啡!

如何在Android中使用JPEG创buildGIFanimation(开发)

我正在寻找一种简单的方法在原生Android应用程序中创buildanimationGIF。 源文件应该是JPEG(来自相机或以前),输出应该保存为GIF的设备上。 我不想知道如何播放animation或GIFanimation文件。 要清楚:我想知道如何将单个图像逐帧放入“电影”,然后将其保存为.gif文件。 例如, 这个应用程序可以做我想做的事情。

什么是缓动function?

在animation的上下文中,缓动函数是什么意思。 似乎dojo,jquery,silverlight,flex和其他UI系统都有缓动function的概念。 我找不到放松function的好解释? 任何人都可以解释一下easing函数的概念,或者对它们进行一个很好的解释,我对这个概念没有兴趣,而不是在框架的具体细节上? 是放宽严格用于位置,还是一般的,可以应用于任何物体的属性?

如何在iOS中的其他视图后面添加视图

我想在我的标签栏模拟在iOS中添加一个视图,然后显示它后面的animation。 但是,当我使用我的代码,必须来自我的标签栏后面的视图重叠我的标签栏一段时间。 这是我的代码: – (void)handlePressedButton { if (pressedButton.selected) { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.5]; CGAffineTransform transform1 = CGAffineTransformMakeTranslation(-196.0, 0.0); CGAffineTransform transform2 = CGAffineTransformMakeTranslation(0.0, 0.0); [leftPanelView setTransform:transform1]; [movedView setTransform:transform2]; [UIView commitAnimations]; pressedButton.selected = NO; } else { pressedButton.selected = YES; if (leftPanelView) { [leftPanelView removeFromSuperview]; leftPanelView = nil; } CGRect viewFrame = CGRectMake(-196, 0, 236, 748); […]

CoreAnimation Layer Backed View和Layer Hosting View有什么区别?

核心animation中的图层支持视图和图层主机视图之间有什么区别? 什么是设置每个步骤,什么时候适合使用这两种types?

onAnimationEnd没有被调用,onAnimationStart工作正常

我在PopupWindow中有一个ScrollView。 我使用TranslateAnimation为ScrollView内容制作animation。 animation开始时,onAnimationStart侦听器被调用,但onAnimationEnd没有被调用。 有任何想法吗 ? 布局: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/popup_window_bg" android:layout_width="match_parent" android:layout_height="wrap_content"> <View android:layout_width="@dimen/toolbar_padding_left" android:layout_height="@dimen/toolbar_height"/> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+web/toolbar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scrollbars="none" android:visibility="invisible"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> … </LinearLayout> </ScrollView> </LinearLayout> animation代码: mToolbar = mPopupContents.findViewById( R.web.toolbar ); TranslateAnimation anim = new TranslateAnimation(0, 0, -60, 0); anim.setDuration(1000); anim.setAnimationListener(new Animation.AnimationListener() { public void onAnimationStart(Animation a) { […]

还原iOS7以前的UINavigationController pushViewControlleranimation

所以。 刚开始将IOS代码转换到IOS7,遇到了一些问题。 我有一个UINavigationController ,它有子ViewControllers和我使用pushViewController来显示下一个视图。 使用一组图像创build视差animation,如果自定义UINavigationController来为一组UIImageViews设置animation,并且我的子ViewController都有一个self.backgroundColor = [UIColor clearColor] ,透明度。 从iOS7开始, UINavController通过移动当前视图控制器来更新它的子vc的animation,并且在顶部推动新的视图控制器,我的视差animation看起来很糟糕。 我看到以前的VC移动一下,然后消失。 有什么办法可以恢复以前的UINavigationController pushViewControlleranimation? 我似乎无法在代码中find它。 WelcomeLoginViewController* welcomeLoginViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"WelcomeLogin"]; [self.navigationController pushViewController:welcomeLoginViewController animated:YES]; 即使尝试使用: [UIView animateWithDuration:0.75 animations:^{ [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [self.navigationController pushViewController:welcomeLoginViewController animated:NO]; [UIView setAnimationTransition:<specific_animation_form> forView:self.navigationController.view cache:NO]; }]; 有没有人有任何线索?

为什么我的CSS3animation不能在Google Chrome浏览器中stream畅播放(但在其他浏览器上却很stream畅)?

我的环境(我在哪里得到延迟): Chrome上的Mac OSX El Capitan 10.11.2版本50.0.2661.102(64位) CODEPEN: animation: 情况: 我search了很多,没有find任何适合我的东西。 我知道这个问题之前已经被问过了。 当我使用Safari和Firefox打开网站时,我的Mac上的CSS3animation非常stream畅,但Chrome浏览器不支持! 奇怪的是,原来的CodePen在Chrome上很stream畅。 问题: 我的代码中的某些内容导致animation只在Chrome上出现波涛汹涌。 这是什么,我该如何解决? 我看到了什么: Chrome CSS 3转换不顺畅 我需要我的定位是相对适应不同的屏幕尺寸。 Chrome中的CSS3转换不顺畅 How to Create Smoother Animations and Transitions in the Browser Fixing CSS Transitions in Google Chrome How to Create Smoother Animations and Transitions in the Browser 码: HTML <div class="marquee"> <ul> <li> <a […]

iOS 7启动图像(闪屏)淡出

在iOS 7上,启动图像淡出,而不是在应用程序加载时立即消失。 有没有什么设置来防止这个启动图像淡出animation? 我需要它立即消失,就像在iOS 6和更早的版本。 编辑答案: 是的,可以将初始图像作为UIImageView添加到顶部窗口,并在完成初始化淡出animation之后将其隐藏。 但是这会导致我试图避免的延迟0.4秒。

当我更新模型图层时,CABasicAnimation不能正确animation

我目前正在实现一个animationCALayer transform属性的CABasicAnimation 。 现在,虽然我是Core Animation的新手,但是我已经能够通过各种博客和文章(例如objc.io)来收集使用经常(不正确)推荐的方法来获取animation的非常不好的想法, fillMode和removedOnCompletion属性的animation。 这种方法被很多人认为是不好的做法,因为它会在模型​​层和表示层之间产生差异,所以将来对这些层之一的查询可能与用户所看到的不匹配。 相反,推荐的animation制作方法是在将animation添加到正在animation的图层的同时更新模型图层。 但是,我很难理解这是如何工作的。 我的animation很简单,像这样: CATransform3D updatedTransform = [self newTransformWithCurrentTransform]; // Location 1 CABasicAnimation *transformAnimation = [CABasicAnimation animationWithKeyPath:@"transform"]; transformAnimation.duration = 1; transformAnimation.fromValue = [NSValue valueWithCATransform3D:self.layerBeingAnimated.transform]; // Does not work without this. transformAnimation.toValue = [NSValue valueWithCATransform3D:updatedTransform]; // Location 2 [self.layerBeingAnimated addAnimation:transformAnimation forKey:kTransformAnimationKey]; // Location 3 我已经指出了三个位置,我尝试使用代码更新模型图层 self.layerBeingAnimated.transform = updatedTransform; 在位置1,图层跳转到newTransform并且不animation。 在位置2中,该层完全按照我希望从当前转换到newTransformanimation。 […]