문제

I am working on a fix for iOS 7 and having a problem. When I run my app on real device (iPhone 4S iOS 7), the screen looks different than when I run the same app on iPhone 3.5 inches iOS 7 Simulator. I am trying to understand why and what is the reason for that, if anyone can help it would be great!

First screenshot from Simulator, second picture from Device:

SOLVED: The app on the real iPhone has a base SDK 6.0 and the app that is on the Simulator has base SDK 7.0. So I guess the real device knew how to compensate for the low SDK base, unlike the simulator which behaved totally in a SDK 7.0 environment and thats why it was showing differently. thanks!

SIMULATOR:

REAL DEVICE:

도움이 되었습니까?

해결책

For anyone else reading this, Roy's 'Solved' comment above is correct.

I have gone into Xcode after the update and it had automatically updated my Base SDK to the latest 'iOS 7.0'.

After changing this back to 'iOS 6.1' - both the Simulator and Device are now working the same, as expected on iOS 7.

Not trying to steal Roy's thunder (whose saved me a good numbers of hours - thank you), just summarizing to others how to quickly fix the issue.

Ralph

다른 팁

Contrary to the proposed solution, Apple Documentation recommends to set Base SDK to the latest iOS https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringYourApp/ConfiguringYourApp.html#//apple_ref/doc/uid/TP40012582-CH28-SW37, so there must be a better solution

I also faced same issue..

I solved by adding below code at viewDidLoad method..of view controller.

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

Hope it helps..Thanks.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top