How to choose a story board in Xcode 5.1? - ios

I'm working from an empty project. When creating a new storyboard, how can choose the default/main storyboard? The old versions of Xcode had a drop down menu for this. The closest thing I have come across is a drop down menu for "Main interface" in the general tab of the project. But I don't think that is the same.

Open project
Navigate to project settings
Open Info tab
Check if you have Main storyboard file base name key in plist
Set value Main for this key.
The value is connected to your UIStoryboard file name that is in your project. So you can point concrete file that you want to use.
Also on the General tab you have drop down menu under Deployment info part that says Main Interface.

Related

Assistant editor(Xcode 7.3) always showing interface file in storyboard , even when I choose manually

Even after deleting derived data many times, and trying other things, I am still facing this problem. Can you help me?
You can try using the shortcut key instead, to open up the assistant editor.
Shortcut key: -
option + click on the file which you want to open up in the assistant editor
Guys I just stop dealing with this problem by changing the settings in xcode 9.2. And now i use Navigation Pane.
Here is how it works :
Ok now if you go to xcode -> preferences -> navigation
and Choose the "Uses Focused Editor" as in the picture below.
Now you can manually select inside the Navigation Pane.
Just click whichever page you would like to change and select in the Navigation Pane.
Here is a few screenshots :
Pictures shows code files but it works with everything you can click in the Navigation Pane.
Try to drag and drop file from the Project Navigator into the path of the Assistant Editor as temporary fix.
You also can click on this icon to bring recent files.
Try to clean your project, clean Build Folder, restart Xcode.
Make sure the view controller in your Storyboard has correct custom class name.
I think I know the problem you're having. I experience it too, but it's intermittent. Sometimes clicking Manual shows me the entire project folder and I can select the editable classes, but other times it only shows the interface versions of them, which aren't editable and cannot have IBOutlets dragged to them (you can tell b/c it'll say internal class and has less code). I have noticed that if I toggle back and forth between Automatic and Manual, I can usually get the editable class to appear. I also will toggle the assistant editor off, select a different View Controller or two on the storyboard, then go back to my original one, turn the Assistant Editor back on, and it starts working again.
There are other discussions of it here, here, and here. This suggestion of turning off indexing sounds intriguing and worth a try if the problem keeps reappearing. UPDATE: This trick with hitting the + and opening a 2nd file, then closing the interface file, worked great when I tried it just now.
Here are pics of how the Automatic side shows the actual file when the Manual side only shows the interface, which says internal next to class:

How to apply localization without Storyboard

I don't use storyboard or xib for this project (full code)
When I add new localization, it shows no file in the list, and when I press Finish, no folder created.
You need a Localizable.strings file. If you already have that, select the file in the left panel. Then, click the button that should be in the right panel that says "Localize..."
Once you do this, you should be able to add other localizations the way you were trying to.

How to preview Storyboard in Xcode using Non-Base localisation

I have a Storyboard in Xcode 5.1 with a base Localization of English, and a second Localization in French.
When I'm using the Xcode Storyboard editor the strings are shown in English, as expected. Is there any way to make Xcode display the Storyboard in my other localization (French)?
I don't want to change Mac OSX's language, I'm hoping there's an option in Xcode somewhere.
EDIT: I have this in my resources folder
If I double-click Main.storyboard then the storyboard opens showing English (base language), as expected.
Is there a way to view Main.storyboard, but showing the text displayed in Main.strings?
EDIT:
I've since discovered (thanks to this tutorial) that there's a 'preview' option in Xcode. 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. This shows how the ViewController will look in landscape/portrait 568/480 high modes. Very handy, but still shows everything in English.
If only this'd let me select a localization, it'd be a great way to check the text layout works in different languages..
I believe that Xcode is not prepared to show localized storyboards in Interface Builder when using string files. However, it allows for you to convert formats quite easily. Select your storyboard file and in the utilities panel, select the language you want to preview:
Change the "Localizable Strings" to "Interface Build Cocoa Touch Storyboard":
You should now be able to select the French storyboard file and preview it within IB.
Once you are done, you can convert the file back to "Localizable Strings" reversing this procedure, or using your source code version control system. Then you can update the base file with any necessary adjustments, and verify it is to your liking using this method again.
Xcode 6 now includes a feature to do this.
From What's New in Xcode - New Features in Xcode 6:
Preview in Interface Builder. While designing in Interface Builder, the preview assistant can show how the interface appears in other languages. You can see how your interface responds to longer or shorter languages.
Hurrah!
Just click on you storyboard file and you can devellope it to show your Localization storyboard.
In Your case if you use the localization "base" option, you must see 3 storyboard file (one for "base localization", one for english and one for french).
Sorry for my english but i hope that help you.

Xcode 4 why do I see XML when clicking on MainStoryBoard.storyboard: seems like a bug

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 ?
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"
This worked for me using xcode 6
I've run into this issue, but it was a bit different. I had a merge issue with Git on my storyboard, so I had to manually edit the XML to resolve the conflict. After this, there was no 'Interface Builder-iOS Storyboard' option available in the "Open as" menu so I couldn't change it back to the visual editor. To fix this I simply restarted XCode and everything went back to normal.
After using SeanK's solution (restart XCode) I still manually needed to right-click the storyboard and choose Open as > Interface Builder - iOS Storyboard.
If you have more than just one storyboard go back and forth - click different one, go back to the one you want to display as an iOS storyboard. It's not XML any longer.
Change the extension like this "your_storyboard.storyboard" then right-click MainStoryboard.storyboard, then choose "Open as >" and then "Interface Builder - iOS Storyboard".

How to bring back the full Xcode 4 interface?

This is crazy! I opened two separate editor windows by double-clicking in the files navigator. Then I closed Xcode.
Now, every time I open my project Xcode is completely gone. All I get are these two separate editor windows. I tried everything to get Xcode back, but when I open this particular project there is no Xcode interface - just the two lightweight editor windows.
Did anyone else encounter this problem? Is there anything else I can do, other than creating a blank new project from scratch and copying everything over?
There's no such thing as a "lightweight editor window" in Xcode 4. What you're seeing is a window that has the toolbar, tab bar, navigator pane, and utilities pane all hidden. You can show them again from the View menu.
To bring back everything:
View->Show Toolbar
View->Show Tab Bar
View->Navigators->Show Navigator
View->Utilities->Show Utilities
The last two can also be done from buttons on the toolbar.
Depending on what you expect the window to look like, you may also need to use View->Debug Area->Show Debug Area.
Select one of these editor windows, and then go to View -> Show toolbar. There is the rest of your interface.
Try going to the menu and selecting Navigate and "Reveal in Project navigator"
With the project open, select View > Show Toolbar.

Resources