Wednesday, March 25, 2015

My first iOS Project with Udacity.

I've always wanted the opportunity to learn how to code an iOS application.  So when the opportunity to participate in UDacity's "iOS Developer Nanodegree" I jumped at the chance to take on the challenge. So far, the experience has been nothing short of fantastic!

In the first three lessons for the first project, I've learned a lot about iOS development!  Today I'll tell you more about what I've learned so far with this class, such as the basics of the XCode IDE, initial basics of iOS Swift code, how we use the MVC programming pattern, libraries such as UIKit and AVFoundation, buttons, constraints and actions,  screen navigation and the basics of audio playback.

The assignment/project
 For my first project for the degree I am learning to build an application called the "Pitch Perfect" app which will allow me to record my voice and play back my recording at different pitches.   Here are some of the methods, tools and code I've learned so far on it!

XCode
To start the first course, I was introduced Apple's Swift development environment, XCode.  Within XCode we learned how to navigate the panels, how to add and remove components to our application, customize our workspace and most importantly how to seek out solutions to problems within the documentation.

MVC Programming Pattern
We learned that MVC stands for Model View and Controller.  Your Model is your data or where it is managed, your View is where all of your user interface modules live (buttons, images, etc) and your Controller is what is in charge of managing user input, displaying data, manipulation information and basically orchestrating functionality of the application specifically using Actions and Outputs.

Framework References
I also learned about two of the iOS Framework references available to me in Swift.  Frameworks are a collection of classes within Swift similar to what we would call a "library" in Front-End development.   In the class I learned how to include a framework reference, techniques and links for getting answers to common questions with these references, which has been an invaluable tool I've gleaned in and of itself.  Let me tell you about the two framework references we've used in this first project.

UIKit
UIKit provides all of the windows, buttons events we need to build our iOS apps.  It's a crucial framework reference.  Without it, you can't build your app in XCode.  Some of the features I was using for this application for example, include buttons, adding events to handle user input and positioning UI elements using constraints.

UINavigationController
This is a class within the UIKit which enables the developer to manage the screens within their iOS application.  In this lesson, we learned how to map out our navigation, set a starting screen, manage the titles as well as other components the class gives us such as navigation bar and state preservation.

AVFoundation
 I also learned about the AVFoundation framework which enables the developer to manage and play audio and video media in the app.  So far, using this framework reference I've learned to import an audio file, load and reference the file,  playback and adjusting playback rate.

View Lifecycle
In this first project we also learned about the View Lifecycle.  The lifecycle is what happens with a view throughout the application by way of the UIViewController.  This determines what happens on load, on navigate, on unload etc.  Some of the methods we learned about in the UIViewController were initialize, viewDidLoad, viewWillAppear, viewDidAppear, viewWillDisappear, viewDidDisappear and others.  We also learned about the order in which the UIViewController manages these methods and how to take advantage of them for our application.  

Overall the class has been an excellent learning experience.  I didn't expect to have so much of a working application only a couple weeks in.  I'm really excited to see what's on the plate for the remainder of this project and our future projects later on!  I'll keep you posted!

No comments: