S
S
Sly Fox2016-05-27 11:51:35
iOS
Sly Fox, 2016-05-27 11:51:35

What is the best way to implement a separate design for the iPad in a universal app?

Essence of the question: there is an application written in swift without using storyboard, the entire interface is written programmatically using SnapKit. The interface was originally designed for the iPhone, but stretched well on the iPad. Now it was decided to make a completely separate interface for the iPad, which now definitely cannot be universal. The question is, how best to implement this idea? Write inside one project a completely new version for the iPad and programmatically choose how to work? I would also like to try using the Storyboard, but I'm not sure if this is logical due to the existing interface implemented without it.
UPD. Splitting into 2 different applications is not an option

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
German Polyansky, 2016-05-31
@Sly__Fox

Shouted out loud from the first answer.
Forget about xib, this is nonsense, the storyboard can be divided into small ones using the storyboard reference, it turns out very convenient and beautiful, you can also make different storyboards, one for the iPad, and the other for the iPhone, then you can assign different classes to the controllers and so on, this is set in the "General" settings in the project. Good luck)

M
ManWithBear, 2016-05-27
@ManWithBear

Do not engage in nonsense and make a layout in xibs. Respectively MyViewController.xib for iPhone and MyViewController~ipad.xib for iPad. The system itself will pull up the desired ksib.

M
Maxim Globak, 2016-05-27
@maximglobak

Many companies use two different applications, you can also use autolayout or make two functions in the controller like updateIpadUI and updateIphoneUI. If you use different schemes for building an application, then it is better to make a separate application, and if there are all the same elements, but with a different design, then in my opinion the second option is more acceptable. It’s easier to promote and make hotfixes and fix bugs and introduce new features. My IMHO is not to use storyboards at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question