Search code examples
iosswiftiphonexcodeipad

How to reuse code from iPhone project for iPad project? Which way is the best?


I started a company project for about 1 year for iPhone devices. This year, I will start the project for the Ipad device, the feature the same but different layout. My problem, how to reuse that code for Ipad? Which way is the best?

My workspace includes an iPhone project and Pod project.

Thank All.


Solution

  • If UI has major changes then create a new storyboard for the iPad and use the same outlets and classes, you don't need to re-write the code. Just design new ui and attach outlets.