【发布时间】:2016-03-09 09:33:59
【问题描述】:
应用程序的最低版本是在 iOS 7 上设置的。但是我的测试设备是在 iOS 9 上。由于 XCode 7 无法运行 iOS7 模拟器,我无法在 iOS7 上测试我的应用程序。
然而,远程测试团队正在 iOS 7 上进行测试,他们在以下屏幕截图中报告了这个问题 -
这种情况发生在多个地方。仅当我执行 push segue(已在情节提要中定义)时才会发生这种情况。我无法在 iOS9 中重现此问题。我无法签入 iOS8,因为我的模拟器表现得很奇怪。
那么我怎样才能找到这种奇怪行为的确切原因呢?为什么会在第一时间发生?难道我做错了什么?最后,如何在不需要实际 iOS7 设备的情况下对其进行调试?
更新:
我在viewDidLoad中尝试了以下几行
self.automaticallyAdjustsScrollViewInsets = NO
self.edgesForExtendedLayout = UIRectEdgeNone;
但是还是不行。我正在使用 Crashlytics 并发现一个与此最相关的特定问题。这是这个的链接
这是摘录
Fatal Exception: NSInvalidArgumentException
Can't add self as subview
Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x30b42f83 __exceptionPreprocess
1 libobjc.A.dylib 0x3b2f3ccf objc_exception_throw
2 CoreFoundation 0x30b42ec5 -[NSException initWithCoder:]
3 UIKit 0x3336b535 -[UIView(Internal) _addSubview:positioned:relativeTo:]
4 UIKit 0x3336b4bf -[UIView(Hierarchy) addSubview:]
5 UIKit 0x33533f71 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke
6 UIKit 0x33371ac5 +[UIView(Animation) performWithoutAnimation:]
7 UIKit 0x33533879 -[_UINavigationParallaxTransition animateTransition:]
8 UIKit 0x334f0b27 -[UINavigationController _startCustomTransition:]
9 UIKit 0x3340dd63 -[UINavigationController _startDeferredTransitionIfNeeded:]
10 UIKit 0x3340db6d -[UINavigationController __viewWillLayoutSubviews]
11 UIKit 0x3340db05 -[UILayoutContainerView layoutSubviews]
12 UIKit 0x3335fd59 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
13 QuartzCore 0x32fdd62b -[CALayer layoutSublayers]
14 QuartzCore 0x32fd8e3b CA::Layer::layout_if_needed(CA::Transaction*)
15 QuartzCore 0x32fd8ccd CA::Layer::layout_and_display_if_needed(CA::Transaction*)
16 QuartzCore 0x32fd86df CA::Context::commit_transaction(CA::Transaction*)
17 QuartzCore 0x32fd84ef CA::Transaction::commit()
18 QuartzCore 0x32fd221d CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
19 CoreFoundation 0x30b0e255 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
20 CoreFoundation 0x30b0bbf9 __CFRunLoopDoObservers
21 CoreFoundation 0x30b0bf3b __CFRunLoopRun
22 CoreFoundation 0x30a76ebf CFRunLoopRunSpecific
23 CoreFoundation 0x30a76ca3 CFRunLoopRunInMode
24 GraphicsServices 0x3597c663 GSEventRunModal
25 UIKit 0x333c314d UIApplicationMain
26 Palscom 0xf1463 main (main.m:14)
27 libdyld.dylib 0x3b800ab7 start
它们看起来是否相关?如果是这样,可能是什么原因?
【问题讨论】:
标签: ios objective-c iphone xcode uinavigationbar