How to show storyboard instead of text - xcode

enter image description here
Im a noob when it comes to this but, I wanted to show the storyboard file that I made instead of the "Hello world" when I launch the app. Pls Help..

You created a SwiftUI project in your screenshot. That's why you have code instead of a storyboard file.
The fix is to choose Storyboard from the Interface menu when creating the project. Then choose File > Add Files to ProjectName to add your storyboard file to the project. Xcode defaults to using SwiftUI for new projects so you have to explicitly choose Storyboard to use storyboards for your app's user interface.
If you don't see the Interface menu in the second step of creating the project, make sure you didn't select a Multiplatform project. Multiplatform projects don't have the option to choose a storyboard for the user interface.

Related

Compiling Swift source files

When I run the Project, Xcode is always show the message "Building AppName | Compiling Swift source files", without anything. How can I know What wrong with project? thank you!
enter image description here
Xcode Version:7.1.1(7B1005)
It's because your Xcode has option enabled Automatically Refresh Views. To stop that:
Open any XIB or Main.StoryBoard in your project.
From the top Menu bar, select Editor > Untick Automatically Refresh Views option.
From now onwards, it will stop refreshing view.

Xcode Base Internationalization with no Main.storyboard

I'm trying to follow the tips in Apple's I18N and L10N Guide. I have a pre-existing project from which I have (long ago) deleted the Base.lproj folder. Why? Because I have no Main.storyboard or LaunchScreen.xib. Both of those things are handled programmatically.
However I do have a large number of subsidiary storyboards, including a WatchKit Interface.storyboard. When I click the + in the Project (not target) Localizations section, Xcode presents a dialog that lists only the Interface.storyboard file. Not any of the many others.
How can I persuade Xcode to help me localize the other storyboards? Can I do this all manually? As usual, I am sure it is my mental model that needs refinement.
This is an example where configuration yields convention. That is, if you customize your folder hierarchy, Xcode can adapt and implement its naming conventions.
Select storyboard file in left pane (Project navigator)
Click Doc icon (File inspector) in right pane
Click Localize...
This will create a new Base.proj folder inside whatever folder holds the storyboard. If you are like me, you have done lots of folder-factoring. Xcode goes along with this.
Then you go back to the Project Localizations section and click + to add locales. Xcode creates extracts the strings from your storyboard and creates new folders for the corresponding .strings files.

Can not create an iPhone xib file with Xcode 6

The checkbox to create a .xib file in Xcode 6 seems to be disabled. I can not find any way to enable it again. Does anybody know if this is possible?
Make sure you didn't accidentally select the OS X Cocoa Class file type instead of iOS Cocoa Touch Class.
Incorrect:
Correct:
FYI, you can create xib file by follow.
Creating xib files in xcode 6 is,
First of all create empty project as,
Go to-> File > New >Project, Then select IOS >Other > Empty then Next
After that creating a xib file as,
Go to->File >New> File then IOS > Cocoa Touch Class and then NEXT
Then select Viewcontroller and check for the "Also create XIB file" Then Next
This will create a empty project as well as xib file.
I had encountered this problem. Below is fix for this :
Right click on files present in Project Navigator section.
Select New File.
OR
Select File from list of tab present in Xcode
Select New -> File
OR
Simply press cmd+N
Choose template for your new file as iOS not OS X, tvOS or watchOS.
Select Cocoa Touch Class and then press Next
Enter Class name and select subclass of it.
Checkmark Also create XIB file.
Select device type and Language and then click Next
Click on Create and make sure that Targets is selected.

Different views on storyboard and in execution (old project)

We try to create a new project at Xcode. We create it and put some buttons on View on storyboard. When we execute project it executes an old project. What Im thinking is in Java there is a thing like set as main project is there anything like this in Xcode? Moreover if not what might cause the problem of this. It shows different buttons in storyboard and in execution it opens old project :S. I didn't like Xcode to be honest but I have to :(
Your project will have a file called -Info.plist. If you open this you will find and entry with the name of the main storyboard. This should be the storyboard you are editing. If it is something else that would explain the behaviour you describe.

How To Get Xcode Interface Builder To Pop Up When I Click My NIB File?

I am at work and trying to make an application for my company in Xcode, however when I click the Nib file I cannot get the interface builder to pop up. I am on a Mac that has lockdown control on it, and I am wondering if this is affecting my development environment? When I double-click the Nib file nothing happens. It just modals the normal Xcode window. Am I at a loss on this? I am wondering if I am going to have to develop this application away from my work?
I only know that when the file is open with Xcode you must add the quarts composer framework
You can do this going to build phases, frameworks and add
When you make a right-click (ctrl-click) on the file and move to open with is there a link to interface builder? If so you can select the preferred program for all .nib files with
*right-click* > information on a .nib file.

Resources