Open in TheBrain

Common login error

<p>Part 3 of 5: Creating the App
1
&nbsp;</p>

<ul class="checklist">

<li>Create a new project in Xcode. Open up Xcode, and start a new Project from the File menu. Select "Application" under the "iOS" heading on the left side of the window. In the template section, choose "Empty Application".
There are a variety of templates available, all designed for different tasks. Start with a blank template until you get more comfortable with the development process. You can try one of the more complicated templates once you're familiar with how everything works.</li>

<li>You will need to provide a Product Name, your company identifier, and the class prefix. If you don't have a company identifier from Apple yet, enter com.example. For the class prefix, enter XYZ.
Select "iPhone" from the Devices menu.
2Create a Storyboard. The Storyboard is the visual representation of all of your app's screens. It shows the contents of each screen as well as the transitions between them. The Storyboard tool will help you develop the flow of your app.
Click File &rarr; New &rarr; File.
Under the iOS heading, click "User Interface".
Select Storyboard, and click Next.
Select iPhone from the Devices menu, and then name the file "Main". Make sure that it is saved in the same location as your project.
3Assign your Storyboard to your project. Once you create the Storyboard, you will need to assign it as the main interface of your app. This will load the Storyboard when the app is launched. If you don't assign the storyboard, nothing will happen when you start the app up.
Click your project name in the left navigation tree.
Find the Targets heading in the main frame. Select your project from the Targets list.
Find the Deployment Info section in the General tab.
Enter Main.storyboard into the "Main Interface" text field.
4Add your first screen by using a view controller. View controllers dictate how content is viewed by the user. There are a variety of preset view controllers available, including standard views and tables. You will add view controllers to your storyboard, which tells the app how to display the content to the user.
Select your "Main.storyboard" file in the project navigation menu. You will see a blank canvas appear in the Interface Builder window.
Find the Object Library. This is located at the bottom of the right frame, and can be selected by clicking the little cube button. This will load a list of objects that can be added to your canvas.
Click and drag the "View Controller" object onto the canvas. Your first screen will appear on the canvas.
Your first "Scene" is complete. When the app is started, the view controller will load your first screen.
5Add interface objects to your first screen. Once you have the view controller set, you can start populating the screen with the interface objects you need, such as labels, text input fields, and buttons. Interface objects can all be found in the Objects Library list that you found the View Controller object in.
Click and drag objects from the list to add them to your screen.
Most objects can be resized by clicking and dragging the boxes on the edge of the object. When resizing, guidelines will appear on the screen so that you can ensure everything lines up correctly.
6Customize the objects you add. You can adjust the properties for each object, allowing you to create a custom and intuitive interface. For example, you can add placeholder text to a text input field that will help guide the user on what they should input.
Select the object you want to customize and click the "Attributes Inspector" button at the top of the right frame. The button looks kind of like a shield.
Customize the object to your liking. You can change font style, font size, text color, alignment, background images, placeholder text, border style, and much more.
The available options will change depending on the object you are customizing.
7Add more screens. As your project grows, you will probably need to add more screen to display all the content necessary for the app to be useful. For example, if you are making a to-do list app, you will need at least two screens: one for inputting a to-do list item, and one for viewing the entire list.
More screens are added by dragging and dropping view controller objects onto blanks parts of your canvas. If you can't find a blank spot to drop it, click the "zoom out" button until you find empty areas. Make sure to drop the view controller onto the canvas and not onto an existing screen.
You can change the initial screen by selecting the view controller you want to lead with from the project outline. Click the Attribute Inspector button and check the "Is Initial View Controller" box. For example, if you are making a to-do list, you'll want the actual list to be the first thing the user sees when the app is launched.
8Add a navigation bar. Now that you have two screens in your app, it's time to make it so that the user can move back and forth between them. You can do this through the use of a Navigation Controller, which is a specialized View Controller. This controller adds a navigation bar to the top of your app that allows user to move back and forth between screens.[2]
Your navigation controller should be added to your initial view so that it can control all subsequent screens.
Select your initial view in the project outline.
Click Editor &rarr; Embed In &rarr; Navigation Controller.
You should see a gray navigation bar appear at the top of the screen you added the controller to.
9Add functionality to the navigation bar. Now that you have inserted the navigation bar, you can start adding navigation tools to it. This will allow your user to move back and forth between screens.
Add a title to the navigation bar. Click the Navigation Item underneath the view controller you assigned it to. Open the Attribute Inspector and type the title of the current screen in the Title field.
Add a navigation button. Open the Objects library if its not already open and find the Bar Button Item. Click and drag it to the navigation bar. Typically, buttons that move you "forward" in the app are placed to the right, and buttons that move you "back" are placed to the left.
Give the button a property. Buttons can be configured to have specific properties that make them easy to adapt to the circumstance. For example, if you are creating a to-do list, you'll want an "Add" button to create a new entry. Select the button, and open the Attribute Inspector. Find the Identifier menu and choose "Add". The button will change to a "+" logo.</li>

</ul>