Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个视图网格,它们作为子视图添加到主视图中。当我拖动在下一个视图之前添加的视图时,并尝试将其拖动到视图的下方而不是覆盖该视图。在 touchesMoved 上拖动视图时如何修复该内容?
[self.view bringSubviewToFront:yourView];
希望这可以帮助...
还有一种方法,可以导入
#import <QuartzCore/QuartzCore.h>
每个视图都像这样设置 zPosition
view.layer.zPosition = z;