Search code examples
iosxcodestoryboard

What is the best way to copy storyboard from one app to another in ios?


I am working on renovating my current IOS project architecture. To move storyboards, I copied the old Main.Storyboard and LaunchScreen.StoryBoard XML to new Main.storyboard and LaunchScreen.StoryBoard XML (Project name was the same).

I also Fixed the localization and assets linking part. Everything is fine, and after successfully building the project, UI is getting distorted in iPhone 6 and other versions except to iPhone 5. I reconfirm the constraint with the old project, and there was no change.

The old app is working fine with different-different iPhone screen sizes. Is there any right way to copy the storyboard? Or Am I missing something here?

Edit-1

I think StoryBoard layout size is limited to iphone5 only.


Solution

  • The way you did it is correct. You're simply running into the fact that your layout constraints are either non-existant or wrong. There's nothing magical about a storyboard...it's just a file like any other you'd copy into your new project.

    You should probably select your toplevel view in each view controller and then tell Xcode to remove all the constraints and reset them to the suggested ones, and go from there.