0

I am using Xcode 6.1 with OS X Yosemite, I am facing a problem related to Storyboard. The storyboard is behave like iPhone on iPad mini but work as expected with iPad2, this problem is only with Storyboard with systemVersion 3.0 but not on it's lower version like version 2.0.

Below is my iPad mini screenshot (I don't want storyboard to behave like this) enter image description here

and here is my iPad2 9.7 inch (I want this behaviour for iPad mini too) enter image description here

I want to make this app only for iPad so my project configuration is like this enter image description here

but when I change it's configuration Device iPad to Universal it works as expected in both iPad mini and iPad2. But I don't want to deploy on iPhone.

enter image description here

Here is my Storyboard systemVersion 3.0 as viewed source code enter image description here

and when I make change in storyboard's XML systemVersion to 2.0 and targetRuntime to iOS.CocoaTouch.iPad it's again work as expected in both iPad mini and iPad2, but there is again a problem when ever I make some little changes in storyboard like move one pixel a label or button or any object Xcode will update it's systemVersion back to 3.0 and targetRuntime to iOS.CocoaTouch which will cause storyboard work again as iPhone on iPad mini. enter image description here

I don't found any solution over interNet and my self too.

Anand Suthar
  • 3,678
  • 2
  • 30
  • 52
  • Are you using size classes in your storyboard? – matt Nov 19 '14 at 06:11
  • Yes, I am using autoLayout and size classes both. – Anand Suthar Nov 19 '14 at 09:01
  • But iOS 7 has no size classes... So your storyboard is incompatible with iOS 7. You cannot deploy there. That's the problem. – matt Nov 19 '14 at 14:18
  • YES, thanks now everything works as expected. But I don't understand why it's working correct when device target is Universal with sizeClasses on iOS 7.1. – Anand Suthar Nov 20 '14 at 08:36
  • Please delete your question. What you were doing was just silly and not worth asking about (certainly not worth a bounty). – matt Nov 20 '14 at 15:12

2 Answers2

1

You can use Size Classes with iOS versions earlier than iOS 8. The Apple documentation states:

Deploying an App With Size Classes on Earlier iOS Versions

For apps supporting versions of iOS earlier than iOS 8, most size classes are backward compatible.

Size classes are backward compatible when:

  • The app is built using Xcode version 6 or later
  • The deployment target of the app is earlier than iOS 8
  • Size classes are specified in a storyboard or xib
  • The value of the height component is not compact

Storyboard XML content shouldn't be edited directly. That isn't going to solve any of your problems in a reliable fashion, particularly not if you start altering version numbering so that the actual generated storyboard content is a different version to what it appears to be from the header.

It sounds like what you've encountered may be a bug in the way size classes are converted to be backwards compatible, though what is missing from your question to give more information is how you've actually configured your size classes.

Duncan Babbage
  • 19,972
  • 4
  • 56
  • 93
-1

You cann't use size class with iOS7, as concept of size class was introduced in iOS 8. So Removing this size class from the storyboard will work for you.