问题标签 [ios-animations]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
119 浏览

swift - google map Marker Tap动作中DCPathButton的实现

我想实现动画绽放按钮和动作,就像在DCPathButton中用于谷歌地图标记点击动作一样。有谁能够帮我?

示例图像如下所示。

这就是它的样子

这就是我要调用动画的地方

到目前为止,我已经实现了带有标记位置的 DCPathButton。现在我想从上面的方法中调用按钮操作。代码如下。

0 投票
0 回答
378 浏览

animation - 如何:Corona SDK 中的动画

我想使用 Corona SDK 创建一个游戏,并且之前已经这样做了,但没有使用任何类型的动画。这一次,你可能已经猜到了,我需要学习如何制作动画!

我到底在寻找什么?多棒的好问题啊!

我需要一些软件,它可以让我创建多张跑步的人的照片(个人资料视图)和可以让我模拟移动天空的照片。我愿意接受任何和所有建议!

另外,如果你能告诉我如何在 Corona 中编写动画函数,那就太棒了。

0 投票
0 回答
29 浏览

ios - 动画系列未知数组大小的图像

我从网络X图像中获取,并希望使用动画显示它们。我有一个简单的 UIImageView,我想将每个图像显示 5 秒钟,然后继续下一个。如果到达终点,它将永远重复。

我想使用动画TransitionFlipFromLeft。我怎样才能做到这一点?

0 投票
0 回答
33 浏览

ios - 应用程序在过渡中间歇性冻结(2 个顶级 UIWindows)

我的应用程序在过渡过程中间歇性冻结。在调试模式下设法让它冻结后,我们暂停了它并截取了屏幕截图。一些注意事项:

  • 在冻结状态下,CPU 仍在对敲击做出反应,因此它仍在以某种方式响应
  • 查看线程,似乎没有无限循环、繁重的功能或其他任何东西。

然而,查看 UI ViewHierarchy 会发现一件有趣的事情 - 有 2 个顶级 UIWindows,最上面的一个完全为空,而按钮一个被转换视图覆盖。

这里可能的罪魁祸首是什么?我的代码包含在屏幕截图下方:

线程似乎没有做任何事情 在此处输入图像描述

2 UIWindow 中的第一个(空白) 在此处输入图像描述

2 UIWindow 中的第二个 在此处输入图像描述

0 投票
1 回答
257 浏览

ios - 自定义展开 segue 动画显示问题

我正在做我的第一个自定义 segue 动画。我想要的是有一个列表视图,当我在一行上选择时,它不是从侧面滑入,而是从选定的行中展开到位。就像是:

在此处输入图像描述

因此用户选择了绿色行,这会导致新控制器以绿色行大小开始并展开以填满屏幕。到目前为止,这部分工作得很好。

我遇到的问题是 unwind segue 试图做相反的事情,将全屏缩小到原始行,然后关闭。发生的情况是它缩小得很好,但暴露的区域仍然是黑色,然后在动画完成时突然闪烁到位。想要的是这样的:

在此处输入图像描述

但正在发生的事情更像是这样:

在此处输入图像描述

我用于展开的代码perform如下所示:

所以基本上,我如何让我正在展开的视图在动画发生时显示出来?

为了完整起见,这里是前向 segue 代码:

(这是在 XCode8 中,针对使用 Swift3 的 iOS10)

0 投票
0 回答
45 浏览

ios - 最接近的实现 - 推送相同的 UIViewController

我完全知道你不能UIViewControllerUINavigationController. 但是我的实施要求如此。我必须滑动手势。在从右向左滑动时,我必须重新加载视图的内容(即 a UIScrollView)以及动画。反之亦然,从左到右滑动。我尝试过以下操作,但没有给出预期的动画:

在动画块之前,我正在更改UIScrollView使动画持续时间的背景清晰的帧。我在想UIScrollView内容与动画一起被覆盖那么在滑动时重新加载内容和动画的最佳方法应该是什么?

0 投票
2 回答
1447 浏览

objective-c - 如何在 iOS 目标 c 中创建幻灯片动画以将视图滑动到其他类似的 amazon ios 应用程序中

我正在尝试创建一个动画以将视图滑过其他视图,如果达到某个点,它应该调用一个动作。看看亚马逊的屏幕截图。 亚马逊图片 1

亚马逊图片 2

0 投票
1 回答
188 浏览

ios - SpriteKit 中的 Sprite 动画文件大小

我研究了反向运动学作为使用动画的一种方式,但总体而言,我可能想继续使用精灵纹理图集来创建动画。唯一的问题是我关心大小..

我想在“整体全球解决方案”中寻求一些帮助:

我将拥有100个怪物。每个都有 25 帧动画,用于攻击、空闲和生成动画。因此每个怪物总共有 75 帧。

我想我想做 3x、2x 和 1x 动画,这意味着更多的帧(每个怪物 75 x 3 图像)。除非我做 pdf 矢量,否则它只是一种尺寸。

这种方法在规模上是否太过分了?仅 25 帧动画在硬盘上就占 4MB,但我不确定当您将其加载到 Xcode 和纹理图集中时压缩会发生什么。

有谁知道我正在采用的这种方法是否会占用大量空间,如果我想要更多的怪物,从长远来看可能是一个糟糕的决定(现在我只有几个怪物和其他图像,我已经起来了当我在手机上打开应用程序并查看它的存储空间时,大约为 150MB - 所以很难说从长远来看会有更多的怪物会发生什么,但我觉得它会像 4GB+ 那样大得令人望而却步)。

对我来说,这听起来像是错误的方法,但在我阅读的任何地方,他们都鼓励相应地使用精灵和地图集。我究竟做错了什么?动画帧太多?怪物太多?

谢谢!

0 投票
2 回答
368 浏览

ios - UINavigationController forgets how to rotate sub controllers after custom transition animation

I have been fighting the following problem for a couple days now. I cannot find anything in the documentation about what I am doing wrong. I have crawled through the debugger and have dumped all sorts of info to the console, but cannot get my head around how to fix what I'm seeing.

My top level view controller is a subclass of UINavigationController. This contains a subclass of UIPageViewController which will be used to visualize my data. It also contains a subclass of UITableViewController for setting app settings. This "options" view is "linked" to the page view controller via a push segue. At this point, everything worked fine.

Problems started when I wanted to differentiate the visual transition between the various ways of visualizing the data (a horizontal scroll in the page view controller) and between bringing in the option view. So, I created a custom animation to "stretch in" the options controller from the top of the screen (on push) or "roll up" the options controller to the top of the screen (on pop). I set this animation on the navigation controller using the navigationController:animationControllerFor:operation:from:to: method.

Before displaying the options controller everything seems to work fine during device rotation. After displaying/dismissing the options controller, the layout of the data visualization controller breaks down during rotation. It displays correctly in the orientation that the device was in when the options controller was dismissed, but played out incorrectly in the opposite orientation.

It appears that the navigation controller (or possibly the page view controller) has forgotten how to handle accounting for the height of the status, navigation, and toolbar.


The following shows debugging screenshots illustrates the issue on a 5s simulator

  1. Initial state. Note that the content view (red) is below the status, navigation, and tool bars.

enter image description here

  1. Rotated the orientation to horizontal. So far everything is ok. The debug console shows the size the view is being "rotated" to (568x212), the before/after heights of the status, navigation, and tool bars, the screen size, the frame rectangle, and the layer position. I have not shown it here, but the layer anchor point never changes from (0.5, 0.5).

Note that the target rotation size is set using the following rules:

  • rot_width(568) = old_frame_height(460) + sum_of_bar_heights(108)
  • rot_height(212) = old_frame_width(320) - sum_of_bar_heights(108)

And the resulting frame size is set using the following rules:

  • new_frame_width(568) = rot_width(568)
  • new_frame_height(256) = rot_height(212) + change_in_bar_height(108-64)

And the resulting frame origin (0,64) is offset from the top of the screen by the sum of the status bar(20) and the navigation bar(44).

enter image description here

  1. Rotated the orientation back to vertical. Again, everything is ok. The debug console adds the same information as above for the "reverse" rotation. The rotation size and resulting frame size follow the same rules as above.

enter image description here

  1. Pushed the option editor controller view onto the navigation stack using a custom animation. The debug console adds the same information as above for the (currently not visible) content view as above. Note that nothing has changed.

enter image description here

  1. Popped the option editor controller view off of the navigation stack using a custom animation. The content view from above returns to view. The debug console adds the same information as above. Again, nothing has changed.

Note, The stacking order is different from before the option editor was made visible.

This stack re-ordering does NOT hold when using the default transition animator (by returning nil from pageViewController:didFinishAnimating:previousViewControllers:transitionCompleted)

enter image description here

  1. Repeat of step 1. This is where things being to go "wonky." The content view no longer fits snuggly against the navigation and tool bars. The debug console shows that everything going into the rotation looks the same as in step 1.

BUT, the result of the rotation is different from step 1. The rules seem to have changed. The resulting frame size is no longer adjusted to account for changes in status, navigation, and toolbar heights and the frame origin does not change from what it was before the rotation.

enter image description here

  1. Repeat of step 2. It appears that everything is fixed, but that is only because it is playing by the new resizing rules.

enter image description here


My animator class is shown (in its entirety, except for the probes used to produce the debugging info shown above) here:

Thanks for any/all help. mike

0 投票
1 回答
1195 浏览

ios - 抖动搜索栏取消/结束编辑动画

我有一个 SearchBar,并试图让它表现得像你在 iPhone 设置中看到的那样。当它被点击时,动画会平滑地将放大镜从搜索栏的中间过渡到搜索栏的左侧,并平滑地引入取消按钮。但是,当我按下取消时,动画会冻结,然后跳回正常状态,搜索图标位于栏的中间,取消按钮隐藏(参见 GIF 预览)。我的代码中有什么东西让这种情况发生吗?这是搜索条形码:

在此处输入图像描述