Search code examples
iosobjective-cstoryboardxcode4

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?


Solution

  • 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).

    1. The two files should be in the same project, so copy the old storyboard file to your new project.
    2. Then display the two storyboards next to each other via the "show the assistant editor" button.
    3. Click in the top middle of your view and copy via cmd/apple C.
    4. Click on your other storyboard and paste it via cmd/Apple V.