In an Xcode project, I see XML when clicking on MainStoryBoard.storyboard instead of the graphical design, why and how to restore the right view ?
Update: I think it's a bug of XCode 4.2 because on another project, when I click on version editor I have XML but when I click on standard editor it shows visual design.
Is there a way to fix this and not to force me to recreate my visual design by hand once again ?
You have SwiftUI enabled in your project, which does not use storyboards anymore. Your layout is inside the ContentView. swift file. If you do want to work the old way, with storyboards, you should uncheck 'Use SwiftUI' in the project creation screen.
Another benefit to using Storyboards (over creating views programmatically) is that you get to see what your view will look like at runtime without having to run your app. You can quickly make a change in Interface Builder and immediately see what it'll look like – without waiting for Xcode to compile and run.
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.
The answer is YES! Here we will be discussing a simple way to use SwiftUI into our existing project, which already consists of a storyboard.
To fix the issue, right-click MainStoryboard.storyboard, then choose "Open as >" and then "Interface Builder - iOS Storyboard".
Make sure you are not using the source control editor, which shows you the changes for a given file. You can change this in the Toolbar at the top right.
Check this link in the section "Editor"
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