我有一个问题,我已经设计与UIButtons一个应用程序和它的下面是一个的UIImageView。我的问题是,当我启动我的应用UIButtons在UIImageView下。这是我的UIButtons代码。的UIImageView重叠的UIButton
代码:
CALayer *touchedLayer = [myUIButton layer];
CABasicAnimation *wiggleAnimation = [CABasicAnimation animationWithKeyPath:@"transform"];
wiggleAnimation.duration = .1;
wiggleAnimation.repeatCount = 1e100f;
wiggleAnimation.autoreverses = YES;
wiggleAnimation.fromValue = [NSValue valueWithCATransform3D:CATransform3DRotate(touchedLayer.transform, -.15 , 0.0 , -1.0 ,-1.5)];
wiggleAnimation.toValue = [NSValue valueWithCATransform3D:CATransform3DRotate(touchedLayer.transform, -.15 , 0.0 , -1.0 ,-1.5)];
[touchedLayer addAnimation:wiggleAnimation forKey:@"wiggle"];
当动画开始我UIButtons得到的下面,和我的UIImageView那张UIButtons以上,为什么?
这里发生了什么,我在IB设计它首先我把UIImageView,然后四个UIButtons。 UIImageView只是作为我的四个UIButton的背景。 当应用程序开始正确显示所有内容时,但当单击图标执行代码时,问题就会开始。
这是我所观察到的,四个UIButtons,看起来像闪烁,仍然可以接受点击的事件。我的结论是,UIButtons仍然在UIImageView之上,但是显示它们时出现问题。
可能是有什么看法的原因,你可以建议的东西,我还可以做我的目标。
谢谢