Tôi đã nhận được báo cáo sự cố này, nhưng tôi không biết cách gỡ lỗi.
Fatal Exception NSInvalidArgumentException
Can't add self as subview
0 ... CoreFoundation __exceptionPreprocess + 130
1 libobjc.A.dylib objc_exception_throw + 38
2 CoreFoundation -[NSException initWithCoder:]
3 UIKit -[UIView(Internal) _addSubview:positioned:relativeTo:] + 110
4 UIKit -[UIView(Hierarchy) addSubview:] + 30
5 UIKit __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 1196
6 UIKit +[UIView(Animation) performWithoutAnimation:] + 72
7 UIKit -[_UINavigationParallaxTransition animateTransition:] + 732
8 UIKit -[UINavigationController _startCustomTransition:] + 2616
9 UIKit -[UINavigationController _startDeferredTransitionIfNeeded:] + 418
10 UIKit -[UINavigationController __viewWillLayoutSubviews] + 44
11 UIKit -[UILayoutContainerView layoutSubviews] + 184
12 UIKit -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 346
13 QuartzCore -[CALayer layoutSublayers] + 142
14 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*) + 350
15 QuartzCore CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16
16 QuartzCore CA::Context::commit_transaction(CA::Transaction*) + 228
17 QuartzCore CA::Transaction::commit() + 314
18 QuartzCore CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
Phiên bản iOS là 7.0.3. Bất cứ ai cũng trải qua vụ tai nạn kỳ lạ này?
CẬP NHẬT:
Tôi không biết nơi mã của tôi gây ra sự cố này, vì vậy tôi không thể đăng mã ở đây, xin lỗi.
CẬP NHẬT thứ hai
Xem câu trả lời dưới đây.
Tôi đã tạo một danh mục chặn các cuộc gọi này và làm cho chúng an toàn bằng cách đảm bảo rằng không có sự thúc đẩy nào khác đang diễn ra trong khi một cuộc gọi đang diễn ra. Chỉ cần sao chép mã vào dự án của bạn và do phương pháp thay đổi, bạn sẽ thấy ổn.