0
在我的iOS应用程序中,我有一个屏幕,有一堆图标,具有摆动效果。当我按住他们中的一个时,他们开始晃动(如iphone的菜单),但如果我按主页按钮(将我的应用程序发送到背景),iphone会冻结!一段时间后,它会自行重启。这是我使用这样做的效果源:在我的应用程序内摆动(摇动)效果是冻结iPhone(iOS 5)
CABasicAnimation* anim = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
[anim setToValue:[NSNumber numberWithFloat:0.0f]];
[anim setFromValue:[NSNumber numberWithDouble:M_PI/30]];
[anim setDuration:0.1];
[anim setRepeatCount:NSUIntegerMax];
[anim setAutoreverses:YES];
[self.layer addAnimation:anim forKey:@"SpringboardShake"];
,并停止:
[self.layer removeAllAnimations];
此问题只发生在iOS的5相同的代码工作正常的iOS 4。任何想法关于什么会使我的设备冻结?