I have an CABasicAnimation of a little heart that flies across my screen. I would like to have the animation go over a tab bar.
我有一个CABasicAnimation的小心脏飞过我的屏幕。我想让动画通过标签栏。
My problem is that the animation goes behind the tab bar and so is not visible.
我的问题是动画在标签栏后面,所以不可见。
How can I have the animation be visible in front of the tab bar?
如何在标签栏前显示动画?
Thank you.
1 个解决方案
#1
0
The issue is that the view that the heart is on is behind the UITabBar view. You need to make sure the heart view is always the top view.
问题在于,心脏所在的视图位于UITabBar视图的后面。您需要确保心脏视图始终是顶视图。
Try:
#import <QuartzCore/QuartzCore.h>
heartView.layer.zPosition = MAXFLOAT;
#1
0
The issue is that the view that the heart is on is behind the UITabBar view. You need to make sure the heart view is always the top view.
问题在于,心脏所在的视图位于UITabBar视图的后面。您需要确保心脏视图始终是顶视图。
Try:
#import <QuartzCore/QuartzCore.h>
heartView.layer.zPosition = MAXFLOAT;