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
?
Select the storyboard in the navigator, right click and select 'Open As'. You should see 2 options 'Interface Builder - Storyboard' or 'Source Code' - select the Source Code option should fix your issue.
To get this, open the storyboard, click the 'assistant' editor, click the 'assistant editor menu button' (immediately to the right of the > arrow at the top left of the assistant window) and select Preview.
If you go over to the project outline and control click on the storyboard file and hold down the cursor, you will see the option to open as, this will let you open the storyboard as a certain type. Click on that and choose open as story board.
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"
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With