How to open Storyboard as xml source?

拟墨画扇 提交于 2019-12-30 05:46:08

问题


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?


回答1:


To open Storyboard as XMl source:

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

Hope this will help.

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"




回答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



来源:https://stackoverflow.com/questions/30567998/how-to-open-storyboard-as-xml-source

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!