简体   繁体   English

如何从上到下为视图设置动画并正确堆叠该视图?

[英]How to animate a view from top to bottom and stacking that view properly?

I want to, as properly as possible, animate a view from top to bottom. 我想尽可能正确地使视图从上到下进行动画处理。 Then do the appropriate magic to handle memory allocations and such. 然后做适当的魔术处理内存分配等。

In other words, I want an inverse 换句话说,我想求逆

UIModalTransitionStyleCoverVertical

This modalTransitionStyle pops the view up from bottom, while what I'd like it to do is arrive by airplane. 这个modalTransitionStyle从底部弹出视图,而我希望它是通过飞机到达的。

I've looked into some black magic CATransition , but I can't for the life of me find a proper way of handling memory and dismissing (or "popping off") the view with this method. 我研究了一些黑魔法CATransition ,但是我一生无法找到一种适当的方式来处理内存并使用这种方法消除(或“弹出”)视图。

A solution as close to "as Steve Jobs intended" is much preferred. 最好选择接近“按照史蒂夫·乔布斯的意图”的解决方案。

PS: The solution does not need to deal with the view as modal. PS:该解决方案无需将视图作为模态处理。 Actually dealing with it as a new "card" on the stack would be best. 实际上,最好将其作为堆栈上的新“卡”来处理。

How about UIView UIView怎么样
+ (void)transitionFromView:(UIView *)fromView toView:(UIView *)toView duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options completion:(void (^)(BOOL finished))completion

or 要么

+ (void)transitionWithView:(UIView *)view duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从上到下为视图设置动画? - How to animate view from top to bottom? 如何使用CATransform3D在iOS中从底部到顶部对视图进行动画处理 - how to animate view from bottom to top in iOS using CATransform3D 在uinavigation控制器中从下往上推视图 - pushing a view from bottom to top in uinavigation controller iOS:截取从顶视图到底视图的轻击手势事件 - iOS: Intercept tap gesture event from top view to bottom view iOS)如何使用顶部和底部的固定视图制作Tab视图 - iOS) How to make Tab View with fixed view at the top and bottom 如何从Alpha值1到0设置视图动画,隐藏视图,从0到1设置视图动画,然后取消隐藏视图? - How can I animate a view from alpha value 1 to 0, hide the view, animate the view from 0 to 1, then unhide the view? 如何从底部弹出视图? - How to popup a view from bottom? 如何通过选择UITableView单元格而无需堆叠无限控制器来正确地累积“详细”视图控制器中的更改? - How can I properly cumulate changes in a “detail” view controller from choosing UITableView cells without stacking infinite controllers? 如何在表视图顶部正确堆叠容器视图 - How to properly stack a container view on top of a table view 触摸时将底部视图变为顶视图 - Bring bottom View to Top View while touchesMoved
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM