어제까지 iOS 앱에서 기본 애니메이션을 만들었습니다.UIKit에서 CoreAnimation 호출에 의해 크래시가 트리거되도록 디버깅하려면 어떻게해야합니까?
나는 분명히 그것에 영향을주는 변화를 만들었고 그 문제점이 무엇인지 식별하는 데 어려움을 겪고 있습니다.
코드를 단계별로 때,이 코드 덩어리에 도달, 나는의 아름다움을 실현하기 전에 commitAnimation 라인을 통해 스테핑 후 (나는 원래 쓴 사망 [UIView의 animateWithDuration : ...] :
UIView *favoritesTabItemView = [appDelegate.tabBarController.tabBar viewWithTag:0];
CGPoint startingPoint = [[magazineView superview]
convertPoint:CGPointMake(magazineView.center.x, magazineView.center.y) toView:appDelegate.window.rootViewController.view];
CGPoint targetPoint = CGPointMake(favoritesTabItemView.center.x - 214.0, favoritesTabItemView.center.y);
//shrink the icon down
UIGraphicsBeginImageContextWithOptions(magazineView.bounds.size, NO, 0.0);
[magazineView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[UIImageView beginAnimations:nil context:nil];
[UIImageView setAnimationDuration:0.1];
PublicationCoverImageReflectionView.alpha = 0.0;
[UIImageView commitAnimations]; //<-- crash happens after this line
을
내가 commitAnimation을 통해 단계 후에 디버거에서 오류 것은 나에게 약간의 도움을주고있다 :
*** Terminating app due to uncaught exception 'NSRangeException', reason:
'*** -[__NSArrayM objectAtIndex:]: index 9 beyond bounds [0 .. 8]'
*** First throw call stack:
(0x35c8b88f 0x31604259 0x35bd49db 0x126d5d 0x12e65f 0x349da6c9 0x34a66531 0x35c57547 0x35be3097 0x349da3eb 0x307a3a13 0x10f8ef 0x35be53fd 0x307a9faf 0x307a9f6b 0x307a9f49 0x307a9cb9 0x307aa5f1 0x307a8ad3 0x307a84c1 0x3078e83d 0x3078e0e3 0x3596122b 0x35c5f523 0x35c5f4c5 0x35c5e313 0x35be14a5 0x35be136d 0x35960439 0x307bce7d 0xbb109 0xbb0c8)
terminate called throwing an exception(lldb)
이 사람이 무슨 말을 할 수있는 배열의 종류를 알고 있나요을 그것에서 죽어 가고있는 UIKit 호출이다, 그래서 배열 배열이 몇 가지 배열이라고 생각하고 있습니다. ws는 UIKit에서 사용하지만, 나는 그것에 대한 가시성이 없습니다 ...
이 문제를 해결하거나 더 자세히 조사하는 방법에 대한 아이디어는 훌륭합니다!