Search code examples
iosswiftuser-interfaceipadios-universal-app

How to add iPad UI to existing app?


There is an application written in swift without the use of a storyboard, the entire interface is written programmatically using SnapKit. The interface was originally developed for the iPhone, but we decide to use it also on iPad. Now it was decided to make a completely separate interface for the iPad, which can not be universal. Actually the question how best to implement this venture? I have only one idea: write separate version of app for iPad in existing project and programmatically chose with to run, but it will produce code duplication. I would also like to try to use the Storyboard but not sure if this is logical because of the existing interface implemented without it.


Solution

  • Create a new target in your Xcode project and set it to be for iPad in its General settings. This will allow you to share the code base.