Swift Noob: The Very Basics 1
So for this class i'm following, i'll be keeping a weekly blog about the amazing world of Swift and design. I decided to choose Swift and design as my subject, because i've always wanted to make a iPhone apps. Throughout my years as a IT student i've made apps for Android and Windows phone, but I always kept a special place in my heart for iPhone apps. Also, design because I love good design. Good design is so amazing, it makes my day. So, my goal for these coming weeks, is to learn how to make an amazing design with Swift.
Let's start with the basics.
So what I've noticed since I started learning about Swift, is that it's a little hard to find some good basic tutorials. This could be because many many developers went from Objective-C to Swift, which is a small and simple transition. So many tutorials will be about how to do stuff in Objective-C which you'll have to translate to Swift yourself. Luckily, more Swift tutorials are coming on their way so thats good. I wanted to blog about the basics of Swift and i'm gonna assume that you, the reader, already downloaded xcode (look here: https://developer.apple.com/xcode/downloads/) and just wanna jump in all the goodness of code. So here is something you might wanna know:
![]() |
Image credits go to Lynda.com |
1. Read info.plist: A general configuration file read and loaded in by the@UIApplicationMain. So here you'll find stuff like the names of your launchscreen file and your main storyboard file
2. @UIApplicationMain: This is a built in function in iOS that creates an object called UIApplication (yes, the one from point 3) and your app delegate
3. Your app delegate/ AppDelegate.swift: Here goes your extra custom behavior code that you would want at application level. So for example what behavior do you want your app to have when starting up, going into background, when being determined etc.
4. UIApplication object: Kicks off the run loop and continues to respond to events
5. Launch screen file: This is the screen you see when your app starts launching. It gets its configurations from the info.plist
6. Main Storyboard file: After the launch screen file has been loaded, this is the main view controller that will be shown in your app
7. UIWindow: A single object thats automatically created that represents the size and boundaries of an iOS app. Content of an app shows up in here in this window
So those are the fundamentals of your iOS app. I feel like this should be your basic knowledge when creating your first Swift app since this is what makes your app! (even though its still empty waiting for your magic to happen)
0 reacties