How to open Storyboard as xml source?

14,699

Solution 1

To open Storyboard as XMl source:

enter image description hereRight click on your storyboard, you will see a menu, hover over "Open As" then select "Source Code"

Hope this will help.

enter image description here

To go back to view storyboard in the design build mode,

Right click on your storyboard, you will see a menu, hover over "Open As" then select "Interface Builder -- Storyboard"

Solution 2

If Xcode can't open the file .nib or .storyboard ( may be because of merge conflict ) then you can open in textEdit

open -a textEdit

Share:
14,699

Related videos on Youtube

new2ios
Author by

new2ios

Updated on June 13, 2022

Comments

  • new2ios
    new2ios about 2 years

    I need to reorder View controllers in my Storyboard. I know that I need to open Storyboard as source code using right clicking on the file and using menu Open as.... Then I can open Storyboard as xml file.

    My problem is sometimes the source is opened as text - there are no colour differences on the comments for example. Also when I make move of the code inside it is not indented properly.

    How to open Storyboard source as xml?