Multiple main storyboards in one Xcode file - ios

I am currently working on a mobile app on Xcode (I believe Xcode 11). I have the original main storyboard in tact. However, I ended up duplicating the main storyboard and renaming it something else, then I completed another component on that interface of that storyboard. However, I now want to merge the duplicated storyboard with the original main storyboard without having to make another view controller on the original one but I don’t know how. Help?

What best you can do is store copy duplicated Storyboard on desktop . Resolve conflict by considering Main Storyboard . Now Copy Controllers you have made on duplicate Storyboard from desktop into your main Storyboard.
Thats what I prefer to do when multiple developers working on same Storyboard.

Related

XCode 8 : Weird Storyboard issue that rolls back changes each time after it is saved

I am facing a really weird storyboard issue. I am using Version 8.0 (8A218a) . For one of my projects, I have two storyboard files, one for iPhone and one for iPad.
Both storyboards are behaving insanely: I open a storyboard file and make changes to a ViewController's view, then I save. I run the application and every thing is OK.
I switch to another file then open the stoyboard file again, and it loads back the old view! (changes subviews locations, to the left after I center them, the same subviews every time).
To track down the issue :
1- I made a copy of the project, cleaned, deleted derived data. Did not solve.
2- I thought about Source Control, so I disabled Git. Did not solve.
3- Unless it is a common bug, I am out of options.
The problem is that it does this in each of my 2 storyboard files. And when I open one and fix it them switch back to the second, I find it changed!
Did anyone face this weird issue with storyboard?
Any explanation and/or suggestion to solve it please?

Why there are showing Two Storyboards in my every new xcode project?

Whenever I am trying to open a new project xcode always giving two story board and two View controller one DataViewController instead of showing one view controller and one story board .
I am using xcode 7.3.1
my versity hood was an old project of min which has only one view controller but
when i create new project everytime now i get two view controller like alamofire project. Point to be noted that it has started to happen after cocoapods installation and alamofire installation
please If any one knows how to fix it please help.
Are you talking about LaunchScreen.storyboard? If so, that is a special one (that can't be associated with code) that is used to draw something on the screen while your app is loading.
A common thing to do is to draw a version of your start screen with no controls (or all controls disabled) and no data yet (so it looks like it's loading).
Another common thing to do is some kind of splash screen.
You've chosen a wrong template. You need to choose Single View Application while creating your project. That gives you two storyboards and one view controller in Main.storyboard to start with. You have only 2 storyboards like normal. You just two ViewControllers and two ViewController classes. Nothing to worry. Just create a new project and select Single View Application in the beginning when it asks you to choose a template. It'll be fine.

xcode 4.2 ios 5 copying contents of a storyboard

Original Question:
This is my first post ever. I'm trying to learn ios programming by following cs193p (online). I got stuck on assignment 3 with a very (seemingly) simple thing. I did a few google searches on it already.
I don't know how to copy my view from assignment 2 (which is a storyboard) to my new xcode project.
I created a new master detail application (called it Calculator3), copied the storyboard from assignment 2 (Calculator2) in there as well. However, it's not possible for me to get the contents of that storyboard and put them in the new generated storyboard.
So is it possible to copy the contents of one storyboard into another? If not, then how do I do this?
Thanks to LU RD I post my answer here, instead of using an edit in my first post.
Answer:
A friend of mine solved it.
The reason why I got this wrong the whole time was because I did cmd/apple A + cmd/apple C. Instead of clicking at the top of the view I wanted to copy and then do cmd/apple C. After that, paste it with cmd/apple V in the storyboard you want to.
I noticed it only really works in the following situation (I thought it worked in more situations).
The two files should be in the same project, so copy the old storyboard file to your new project.
Then display the two storyboards next to each other via the "show the assistant editor" button.
Click in the top middle of your view and copy via cmd/apple C.
Click on your other storyboard and paste it via cmd/Apple V.
Bringing the old storyboard from source project into your new target project as a temp storyboard works. :)
(I've found it in en.lproj folder from source project) Also you can copy & paste all view controller component by selecting gray bar under your view.
Then remove temp storyboard and continue with pasted one.
You can copy a storyboard to another project by drag and dropping the story board. Make sure to tick the box "Copy items into destination groups folder".
Of course all of your references will break and have to be rebuild, but the layout and segues will all be there.

Sharing scene between multiple storyboard files. iPhone vs iPad

I'm working on a Universal app using storyboarding. I have 2 storyboard files. One for iPhone and one for iPad. I will have a handful of scenes that I would like to share between both and I want to use the storyboard editor to set them up. A common one is a UITableViewController and its prototype cells. I can make it in 1 of the storyboard files but how do I show it in both files without redoing its design?
I don't think that's currently possible, though it would be cool. You could have a third storyboard that was for common views but segues to those views would have to be done programmatically.
Once you create an instance of that third storyboard, you can do [storyboard instantiateViewControllerWithIdentifier:STRING_ID] to get an instance of it.
This is what I did in one of my apps where I had some common tools that were shared.

Go back from Storyboards to XIB

Not knowing that Storyboards are iOS5 only I created project that could be run even on iOS 2.0, but now I can't compile it with target lower than iOS5. Is there an easy way to go back to simple XIB file?
I don't think there's an automatic way to downgrade. Create new xib files for each view controller that needs them and link their view with the appropriate .h file. You should be able to copy and paste your whole UIView container view from storyboard to an xib though so it's really not that bad.
EDIT:
Also, I recently had to do this myself and a few things that weren't immediately obvious to me were that I also had to create a MainWindow.xib file, change your application plist, main.m, and my app delegate. Was definitely more complex than I expected but can confirm it can be done.

Resources