0

I'm developing iOS 8 universal app, I'm using adaptive layer to develop app, all going well.

But, I struck at iPad design, because I used equal width and height for all devices using constraints, its looking good for iPhone devices, but iPad also is showing as like iPhone design, so I need to increase button sizes, so can I use a separate constrains for iPhone and iPad buttons on single storyboard app in iOS 8 with Swift language.

One more doubt is, how to handle dynamic buttons on same storyboard application with auto layouts and constrains

Thanks in Advance.

rintaro
  • 51,423
  • 14
  • 131
  • 139
Sri..
  • 163
  • 5
  • 18

1 Answers1

1

You can select Regular width|Any Height size class and set the size and constraints for the button specific to iPad. According to Apple docs :

Views, constraints, and fonts are added from the size classes in the same way they would be chosen for display on a screen. Items from Any|Any are used unless those items are changed or uninstalled in more specific size classes. In that case, the most specific item is used. For example, in the iPhone nib, modified items in the Compact|Regular size class take precedence over items in Compact|Any. And modified items in Compact|Any take precedence over items in Any|Any.

Regular width|Any Height size class is taken in run time for iPad and Any|Any is taken for iPhone.

Sasi
  • 127
  • 6