6

I have read this thread How can Xcode 6 adaptive UIs be backwards-compatible with iOS 7 and iOS 6?

and especially the answers from Dave and Joey.

Still I am having a hard time getting a simple example to work: xcode 6, size classes enabled, iPhone iOS 7, uibutton width 100 on portrait mode, width 400 on landscape mode. And say width 600 on iPad.

I just can't get this to work. I tried different combinations of setting width constraint, but either the button width is 100 in both orientation modes, or 400, but never different.

I would appreciate if someone could give me a guide, which constraints have to be set on which size class to achieve this.

Thanks,

Community
  • 1
  • 1
Tom Major
  • 283
  • 1
  • 12
  • 1
    Could you fix this? I try to use the new size classes in iPhone but works great just in iOS 8. In iOS 7 or 6 load Compact/Regular for Portrait but when I change the orientation to Landscape, still continues with this and does not change to Compact Width-Any Height. – Beto Dec 05 '14 at 00:52
  • It seems like Apple does'nt want backward compatibility with size classes :/ – Asadullah Ali Mar 11 '15 at 12:21

1 Answers1

3

For iPhone, Deploying an App With Size Classes on Earlier iOS Versions said that the value of the height component should not be compact for earlier version. But in Adaptivity and Layout, the landscape mode of iPhone is Compact height and Compact Width, which means that iPhone landscape mode of size classes will not work for earlier version.

SpritZhou
  • 56
  • 3
  • Yes, I have read the statement about the compact height too. But the answers from Dave and Joey in the thread I referenced made me think there is a working solution for my simple iPhone Portrait/Landscape mode problem with iOS7 and size classes. If it is not possible, this would also be an answer, but I am still hoping someone can give a solution to this small example. Thanks – Tom Major Nov 11 '14 at 22:32