How to open storyboard as xml source?

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

My problem is that sometimes the source opens as text - for example, there are no color differences in the comments. Also, when I do code movement inside, it does not indent properly.

How to open a Storyboard source as xml ?

+6
source share
2 answers

To open Storyboard as an XMl source:

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

Hope this helps.

enter image description here

To return to viewing storyboards in design build mode,

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

+11
source

If Xcode cannot open the .nib or .storyboard file (maybe due to merge conflict), you can open in textEdit

open -a textEdit

+1
source

Source: https://habr.com/ru/post/988298/


All Articles