在过去的两天中,我一直在尝试解决这个问题。无法理解为什么我的应用程序崩溃。

我在用着 JASidePanel 库在我的应用程序中实现面板效果。左侧面板是一个表观视图,其作用类似于中心面板的导航指南。在一种情况下,当在左侧面板中选择一个特定的选项(当打开时)时,中心面板应该仅关闭左侧面板并提供另一个导航控制器(带有一致的)根视图控制器。但是,有时这种过渡崩溃了我的应用程序。

我观察到崩溃不会在Jasidepanel的代码或我的中心面板视图控制器代码中发生([self presentViewController:self.cityNavigationController animated:YES completion:nil];)。我清楚地观察到,由于iOS框架,该应用程序由于某些内部崩溃而崩溃,我通过指令仔细阅读了每个说明,并弄清楚了这一点。

但是,我仍然认为我做错了什么。谁能暗示我为什么会发生这次崩溃?我应该寻找什么来解决这个问题?我可以/应该/应该遵循任何步骤或程序来检测问题?

任何帮助都将受到赞赏。

设备日志:

Thread 0 Crashed:
0   libobjc.A.dylib                 0x3a085b26 objc_msgSend + 6
1   UIKit                           0x3257c788 -[UISearchBar _didMoveFromWindow:toWindow:] + 152
2   UIKit                           0x3249a576 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 662
3   UIKit                           0x3249a576 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 662
4   UIKit                           0x324bb5e2 -[UIScrollView _didMoveFromWindow:toWindow:] + 46
5   UIKit                           0x3249a576 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 662
6   UIKit                           0x3249a576 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 662
7   UIKit                           0x3249a576 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 662
8   UIKit                           0x3249a576 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 662
9   UIKit                           0x32499e68 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 108
10  Foundation                      0x30688d98 -[NSISEngine withBehaviors:performModifications:] + 208
11  UIKit                           0x32499cf2 -[UIView(Hierarchy) _postMovedFromSuperview:] + 294
12  UIKit                           0x324a6998 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1400
13  UIKit                           0x324a6412 -[UIView(Hierarchy) addSubview:] + 26
14  UIKit                           0x32587d8a -[UITransitionView transition:fromView:toView:removeFromView:] + 974
15  UIKit                           0x32587998 -[UIViewControllerBuiltinTransitionViewAnimator animateTransition:] + 444
16  UIKit                           0x32587406 __101-[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:]_block_invoke_2 + 1250
17  UIKit                           0x3251afb6 _applyBlockToCFArrayCopiedToStack + 314
18  UIKit                           0x324931ee _afterCACommitHandler + 426
19  CoreFoundation                  0x2fcf31ca __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18
20  CoreFoundation                  0x2fcf0b6c __CFRunLoopDoObservers + 280
21  CoreFoundation                  0x2fcf0eae __CFRunLoopRun + 726
22  CoreFoundation                  0x2fc5bc22 CFRunLoopRunSpecific + 518
23  CoreFoundation                  0x2fc5ba06 CFRunLoopRunInMode + 102
24  GraphicsServices                0x3493a27e GSEventRunModal + 134
25  UIKit                           0x324ff044 UIApplicationMain + 1132
26  Housing India                   0x000a2606 main (main.m:16)
27  libdyld.dylib                   0x3a592ab4 start + 0
有帮助吗?

解决方案

好吧,如果有的话,这会有所帮助。

问题在于iOS框架。问题在于uinavigationController的实现。撞车事故发生在框架本身内。唯一可能的方法是在展示之前每次实例化导航控制器。这会降低性能,但没有其他选择。苹果,确实有很多局限性和假设。 :p

解释: 我们需要使用模态动画介绍导航控制器。我们试图一次又一次地实例化导航控制器的实例化并试图重复使用。但是,因此,我们观察到了某个时候发生的崩溃。不要完全知道坠机的含义,而是通过一次又一次地实例化来修复它。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top