Start up by opening your Xcode, create a new project, then hit iOS, application, and hit single view application. You can name it whatever you want but I named it "Hello world" tutorial so that i can remember what it is. Keep the rest of the options the same as when you first saw them. Make sure that these:
settings are selected. These settings are on the bottom of your screen. You can save it wherever you want. Now hit create and Xcode will bring you to a screen with files and lots of confusing things, dont worry about any of it. Now select the Main.storyboard file in the top-left of your screen:
This is a file where you can make screens (or view controllers) where you can put buttons and labels and segues to connect view controllers together. You will already have one view controller there. Now on the bottom right of you screen:
there is a menu where you can drag and drop another view controller onto the storyboard. Go ahead and drag and drop a view controller to the right of the first. Now scroll down in the menu until you find a button and a label. What is cool about this is that you can simply drag a button or label onto a view controller. Now lets drag a label onto the view controller and double click it to type something inside it. I put “Click the Button” because of something were about to do.
Click modal. Now you have just created your first segue!!! This means that when you run your app, if you click on that button it will bring you to the next view controller. Cool, Eh? Heck yeah! Now you can put a label on the second view controller saying, “Hello World!” Lets run it! Just hit the play button at the top of the screen.
You have just created you first app!!! Congradulations!
Thanks for reading!
ReplyDelete