2016-03-09 55 views
1

該應用程序的最低版本是在iOS 7上設置的。但是我擁有的測試設備是在iOS 9上。由於XCode 7無法運行iOS7模擬器,因此我沒有辦法在iOS7上測試我的應用程序。
遠程測試團隊然而在iOS上7測試和他們報告這一問題,下面的截圖 -導航欄與iOS7中的另一個視圖控制器的導航欄重疊

Overlap

這是在多個地方發生。只有當我執行一個push segue(已經在storyboard中定義)時纔會發生這種情況。我無法在iOS9中重現此問題。我無法檢查iOS8,因爲我的模擬器奇怪。

那麼我怎樣才能找到這種奇怪行爲的確切原因?爲什麼它在第一個地方發生?難道我做錯了什麼?最後,如何在不需要實際iOS7設備的情況下進行調試?

更新:
我嘗試以下線路中的viewDidLoad

self.automaticallyAdjustsScrollViewInsets = NO 
self.edgesForExtendedLayout = UIRectEdgeNone; 

但它仍然沒有奏效。我正在使用Crashlytics,並發現與此最相關的特定問題。這裏的鏈接,這

The crash Log

而這裏的摘錄

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 

難道他們看起來有關係嗎?如果他們是這可能是什麼原因?

回答

0

設置

self.automaticallyAdjustsScrollViewInsets = NO 

在viewDidLoad中,然後檢查

+0

它沒有工作。請檢查更新的問題 – noob

0

您可以通過實現一個名爲edgesForExtendedLayout在iOS7 SDK新屬性嘗試。請添加以下代碼以實現此目的,

if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) 
    self.edgesForExtendedLayout = UIRectEdgeNone; 
+0

它沒有工作。請檢查更新的問題 – noob