iOS Development With Swift Part 1
This is part 1 of the tutorial to development with Swift. This series of tutorial is a step by step text tutorial of the course on Udacity titled “Intro to iOS Development With Swift”. This course is a very introductory course to swift programming and does not assume that you know objective-c(language used by apple for iOS Development before introduction to swift). These series of tutorials are only there so i can actually be able to explain what i learn and also to help anyone stuck in developing the app. I am only a student of this course but wanted to write about my experience and share things which can help people if they get stuck.
I would recommend anyone to watch the videos on Udacity for this course and if they get stuck than use these series of tutorials to help them. Actually after finishing the application i ran it on iPad and recorded the video for the application. You can read more about the application here. I have included screenshots for the final application along with a video demo of the application. You can do the course on Udacity by paying to get a verified certificate and also coaching etc or go through the other route which i took was to use the free option to Access Courser Materials which is free but you will not get any certificate or coaching. The second options was suitable for me as i was only interested in learning swift programming and i have already got years of experience in iOS development in objective-c and didn’t mind getting no certificate. Also, there is always the discussion forums for free courseware in case you get stuck.
The application is named Pitch Perfect and you can actually record your voice in the application and save it on the device. After you have recorded your voice you can use some new features/classes in iOS 8 related to audio to speed up/slow down the audio and also change the pitch of the audio to make it sound like chipmunks or darth vader. In the demo i have shown how the application works.
As the Udacity course Lesson 1: Introduction notes that you will need to know some basic programming and know concepts like if conditions, loops, functions and classes. This course will not teach you basic programming instead if you know some basic programming than you will be provided enough information to be able to program in swift. Udacity refers to these courses on Udacity to learn Programming:
I have tried the Introduction to Computer Science course and it is a very good course for anyone with no programming experience. I myself have already got a Computer Science background so it is difficult to judge how easy it is to do these courses but when i tried doing these courses they were very easy. In addition to these courses there are many resources for learning programming. You will find many mooc courses for introduction to programming or other sites teaching programming. I would recommend these following resources:
- Computer Science 101 on Coursera
- Introduction to Computer Science and Programming Using Python By Edx
- Search for introductory courses here which updates with the latest information on upcoming, running and past MOOC’s.
- Codeacademy have some good courses on programming.
There are many more resources i could recommend but i think the above resources are enough. You can always do a google search and you will find many more resources/sites for learning programming. Also for iOS Programming there are courses elsewhere also. I will list down some of the resources:
- This is not really a course on Swift programming but iOS programming using objective-c but this course is a must for any iOS Developer http://www.stanford.edu/class/cs193p/cgi-bin/index.php. Basically the course videos and resources are present on iTunes. You can download the videos and you will find code and additional resources on the link i have given. This course is by Paul Hegarty who is an instructor in Stanford and he is the best iOS teacher i have found so far. So far the course right now is for objective-c only but hopefully they might put a swift course when it is offered in stanford.
- Appcoda have some very nice tutorials about iOS Programming.
- I cannot recommend enough tutorials here on thinkster.io. The resources there are great. They refer to apple resources, videos and i am currently reading these resources myself.
- WWDC have some great resources on a range a topics on swift. WWDC are the Apple Worldwide Developers Conference and this is organized by apple and top apple professionals tell you about different topics in iOS.
You don’t need an apple device like iPhone or iPad or iPod in order to do the course. You can stay in the simulator and complete the course. If you do want to test on the physical device then you will need iOS 8 on your device as the application uses some new classes only found/releases in iOS 8. Also, i believe you will need developer account if you want to share the application with anyone which costs $100/Year.
One requirements of course is you need a compatible Mac which has OS X Yosemite and Xcode 6. You can download and run Xcode 6 from here. The reason you need Yosemite and XCode 6 is because iOS 8 needs both of these. An older version of XCode will not support iOS 8. If you get stuck in the installation you can find help on Udacity swift forums here or google it or drop me a comment and i will try to help. Once you have installed XCode 6 move on to the next step.
What you will Learn?
- How to program in MVC(Model View Controller) framework which is a way to organize code into different logical sections based on their functionality which apple recommends while developing iOS applications.
- How to add buttons, images on a view.
- How to change from one view to another. That is change screen or transition to another scene.
- How to record audio in Swift.
- How to save audio in device in Swift.
- How to share data between different scenes.
- How to play audio in swift.
- How to speed up/slow down audio in swift.
- How to change the pitch of the audio.
- How to program in swift.
You can actually learn more about swift programming language from Apple official book for which link is here. It contains examples and everything about swift.
In the next part we will start developing the app. If you want me to add something to these tutorials don’t hesitate to comment on these tutorials or use the contact form to tell me what i should add. In the next tutorial i will start by telling you something about MVC architecture and we will jump in how to develop in swift for iOS development.
The next part of the series can be found here