Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 273
Amit Pal Avatar asked Jun 08 '16 20:06

Amit Pal


2 Answers

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.

like image 23
Gargoyle Avatar answered Nov 07 '22 06:11

Gargoyle


Solution

enter image description here

Than browse your StoryBoardName.storyboard file.

That'll definitely work including all your constants .

Note : make sure you check copy item if needed when you add you file to protect the original source file.

like image 124
tryKuldeepTanwar Avatar answered Nov 07 '22 05:11

tryKuldeepTanwar