Friday, December 19, 2014

iOS Development with Swift - Udacity Review

Udacity is not only a great place to learn, but a community full of experts, enthusiast and pioneers in what educations should be like. I took my first course way back in 2012. I was not only really motivated  to learn  and follow the course, but also amazed of how with IT you have the power to make the world a better place.

This short post is quick review and summary of what I learn so far in the latest course I am taking at Udacity.


 Intro to iOS App Development with Swift


Basics about the iOS official IDE: Xcode:

  • IDE structure
  • Adding resources to the project (images and media files)
  • Using the StoryBoard


Basic concepts behind the MVC design patter, creating and iOS App using the Swift programing language in Xcode:

  • ViewControllers: Inherit from UIViewController class
  • Each View that contains UI Objects (Buttons, Labels, Eg) should have its own ViewController
  • NavigationController: Allows you to create the navigation between views
  • UIObjects can be bind to the controllers in two different ways:
    • Outlet: Creates a reference or pointer to the UI object in order to use it inside the controller
    • Action: Creates a method that allows you to react to a UI event


Two powerful frameworks that you can use to create iOS Apps:

  • UIKit: Provides the elements that allows you to create the user interface (UI)
  • AVFoundation: basic services for working with time-based audiovisual media
Creating the UI of an App:
  • Using the story board you can easily create the UI of an application with drag on drop. 
  • You can add a UI object by dragging it from Utilities panel and placing inside the View in the story board.
  • In order to place the UI elements dynamically you must used constraints. 
  • To add a constraint hold the ctrl key over the UI element and drag it to the side.  (Eg: center horizontally)
  • You can bind UI objects to the ViewController by holding the ctrl key and dragging the mouse pointer from the UI Object to the ViewController class