0

I have an app that is finished with several views, but the problem is that it's built for the 4-inch screen, and I am struggling with Auto Layout. My buttons in the main page are either too large, or the same size as the 4-inch, after I play with the height by 1 pixel ( I was using the equal widths and heights ).

Can I use different storyboards for the 4.7 and 5.5 inch devices instead of Auto Layout, and later on submit it to the App Store? I'm using Xcode 7 beta 3, and whenever I play with constraints, Xcode crashes.

Ajean
  • 5,528
  • 14
  • 46
  • 69
SergeH
  • 608
  • 1
  • 5
  • 20

2 Answers2

1

Yeah there may be some case where you have to use two storyboards, one for iPhone device and next one for iPad. But single storyboard for single device is highly discouraged. If you are having trouble with the storyboards then why not do programmatically? But I suggest you to learn storyboard because it is one of the good thing apple has provided in Xcode.

Kusal Shrestha
  • 1,643
  • 2
  • 13
  • 20
1

Universal storyboard (AdaptiveLayout) with size classes are speficcally for this purpose, its highly recommended that you use storyboard with size classes to support different UI for different devices and orientations. It will make your app more maintainable in future, and if you are going to use new iOS9 features (like using app in split view)etc then its worth while you learn this. To get started visit hereenter link description here

Adnan Aftab
  • 14,377
  • 4
  • 45
  • 54
  • I did read that article but didn't quite help me, i have a bit of a complex storyboard, so auto layout is a bir hard. In the articles, they usually have objects that are either in the middle horizontally or next to the edges. Not my case – SergeH Aug 15 '15 at 14:35
  • Surely you can create complex UI with storyboard, that article is just to give you heads up that how you can different UI for different devices with one storyboard. Rest none of the tutorial will help you fully and you have to customize it your self. With adaptive layout you can select screen type and and can rearrange your view completely, else you can do it via code – Adnan Aftab Aug 15 '15 at 14:39
  • How can you hide an image for only one specific device (i.e., 4s)? All the Size Classes seem to group multiple iPhones into one group, but we just want constraints to apply to the 4s. Is this possible? – Crashalot Dec 29 '15 at 08:17
  • If you want to hide on specific device rather then size classes i.e hiding on 4s but not on 4 then you need to figure yout device name first and you can do that like this check second answer , then you can check in if condition if its iPhone 4s or not http://stackoverflow.com/questions/1108859/detect-the-specific-iphone-ipod-touch-model – Adnan Aftab Jan 04 '16 at 21:03