How can I create a storyboard that works well on both iPad and iPhone for a Today Extension? Can I use size classes? There are other methods? Thanks in advance
Asked
Active
Viewed 475 times
10

Kampai
- 22,848
- 21
- 95
- 95

Andrea Mario Lufino
- 7,921
- 12
- 47
- 78
-
Have you tried using device modifier like `~ipad` or the size classes? – rckoenes Sep 04 '14 at 09:06
-
@rckoenes I tried using size classes, but the results are not so good.. Maybe I'm newbie and I'm missing something. How the modifier works? – Andrea Mario Lufino Sep 04 '14 at 09:33
-
1With the device modifier you can create to storyboards, like `MainInterface.storyboard` for iPhone and `MainInterface~ipad.storyboard` for iPad. I've not tested it, but this is how to do it for normal interfaces. – rckoenes Sep 04 '14 at 10:24
-
@rckoenes I tried it now, creating another storyboard named MainInterface~ipad, but it doesn't work. – Andrea Mario Lufino Sep 04 '14 at 11:54
-
So, does anyone found a way on how to do this use different storyboards for Extensions (iPhone and iPad)? I need to resize the UITableView in my Today Extension to the size of the Extensions View. – David Gölzhäuser Sep 13 '14 at 23:17
-
1@DavidG.No. I work on the default storyboard and I used the autolayout constraints to make the content decent on both devices – Andrea Mario Lufino Sep 15 '14 at 13:41
1 Answers
1
The solution is to activate size classes for the storyboard and then change the Simulated Size of the View Controller to Fixed.
You do not need to create multiple storyboards, but just activate size classes. I don't know why it's disabled per default.
This next step will change your views to the generic size.
And now you have to fix your UI elements to be generic and adaptable through auto-layout.
EDIT: And if you have something like a "fullscreen" tableview within the view, which is the widget, don't forget to create constraints for the nested "fullscreen" view, otherwise it will work on the iPad but overlap on the iPhone.

LetzFlow
- 431
- 8
- 17