How it feels to learn iOS in 2016

It’s a little bit more than Swift

Bob Lee
Bob the Developer

--

Last Update on April 4th, 2017

This article is inspired by one of the most viral and popular articles, “How it feels to learn Javascript in 2016”. Feel free to check out the original post here. Please keep in mind that this article is just my opinion, and the “conversation” is based on my personal experience with learning iOS from scratch.

Bill: Yo Steve, I finally found the next big thing. It will change the world. Since this is my baby, I don’t think I can tell you what it is. But, I still want to ask you a couple questions. As you know, I can’t afford to hire developers, so I am thinking of learning and building by myself. I plan to launch it in three weeks. I learned C in back in college, so building a mobile app should be a breeze. Anyway, you are pretty good with iOS, right?

Steve: Oh, yeah? I contribute to open source projects including Swift and server-side projects. I have been organizing iOS Meetups for the past 5 years. So, I might be the right guy to ask.

Bill: Cool. So, I don’t know where to begin… Right, which programming language do I need to learn?

Steve: (Wanting to say “Let me google that for you”) There are two languages you might consider: Objective-C and Swift.

Bill: Alright, Swift? It sounds bizarre. So, should I learn both?

Steve: Not necessarily, no one is learning Objective-C in 2016 unless you are planning to work with a team whose code is already written in it.

Bill: Then, what’s the difference between Objective-C and Swift?

Steve: The primary difference would be that Swift is a relatively new programming language built and recently adopted by Apple in 2014. While Objective-C is 32-years old and used to build OS X, iOS, and Cocoa Touch frameworks.

Bill: So, you must be saying lots of things are already written in Objective-C. Then, why should I even bother to learn Swift?

Steve: Swift is easier to read. It reads like Python or Javascript. You will no longer see those @ symbols, no semicolon, and no nested nasty bracket hell. Swift is also safer because of Optionals

Bill: Optionals? What the heck?

Steve: In Swift, every instance must be initialized to be type safe. In a real world, however, you will encounter empty values which are known as “nil”. For instance, when you make an API call from Facebook, you may not receive a person’s profile picture. In this case, Swift allows you to deal with the situation using Optionals to store nil values

Bill: I see. That sounds interesting. By the way, do I need to buy a Mac to make apps?

Steve: (Facepalm) Hell Yeah. Come on. Mac OS is always superior.

Bill: I am glad to hear! I recently bought 2016 MacBook Pro. I truly loved the touch bar on its keyboard even though it was only $2399. Why buy Surface Studio? Anyway, what else do I need?

Steve: (Slightly Annoyed) You need to download Xcode.

Bill: What does it do?

Steve: Xcode is the IDE for building Apple software tightly integrated with Cocoa and Cocoa Touch frameworks.

Bill: I have no idea what you just said. Where do I begin?

Steve: (Grinding his teeth) Hey, I gotta catch the train. Talk to you later.

Bill: Wait, Steve, Just one more question!

Steve: No, I have to go now. Just google shit.

3 Days Later

Bill: Hey, Steve. How’ve you been? I spent my entire weekend learning iOS. But, seriously, though, I am confused. I really need your help.

Steve: Oh, yeah? What do you need?

Bill: Well, first of all, I downloaded Xcode and learned Swift and Object Oriented Programming which I have never seen it before.

Steve: (Deeply breathing in) Ok. That sounds about right.

Bill: I also learned how to create UIButtons, UILables, and UIImages using storyboards and connect with view controllers to customize them.

Steve: Alright, continue.

Bill: But, I have no idea why “viewDidLoad” and “didReceieveMemoryWarning” appear whenever I create new view controllers.

Steve: (Relieved) That’s actually a good question. viewDidLoad is a function that runs once when the view controller is first loaded into memory. So you can create such as custom UIs in the block as soon as the view is ready. didReceieveMemoryWarning is also a built-in method that sends to the view controller when the app receives a memory warning. The both are optional. By the way, you will eventually need to learn viewDidAppear and viewWillAppear

Bill: Oh, I see. What are they?

Steve: Never mind, don’t worry about it. Ask me when you need to dynamically update the user interface.

Bill: Oh okay. Also, when I create a new project, there is a Swift file called, “UIApplication”. What does it do?

Steve: It manages the entire app at a higher level. For example, you can instruct what to do when a user presses the home button, receives push notifications, and so on.

Bill: Uhhhh, What? I have never used an iPhone before…

Steve:(smh) Don’t worry about it. You first need to learn UIKit first.

Bill: I thought I’ve already mastered it.

Steve: Not even close. You don’t even know how to create views without using Graphic User Interface.

Bill: You mean the storyboard?

Steve: Yes, you know nothing.

Bill: Wait wait, so you are saying that I can build apps like creating a website using CSS?

Steve: Absolutely. Large teams tend not to rely on Storyboards alone.

Bill: Wait, Steve. What are you talking about? So, you are telling me not to use Storyboards?

Steve: No. You MUST get the fundamental first before you can make custom windows and views. Have you played around with UITableView and UICollectionView?

Bill: Uhhh, nope. Do I have to learn?

Steve: (About to explode) No shit. They are the most used features in UIKit of all time. UITableView is often used to build setting pages and UICollectionView is typically good for user generated content such as Facebook’s Newsfeed, Pinterest and Instagram’s main page, and so on. Just because you learn how to drag and drop, it doesn’t mean you know iOS.

Bill: Oh… So, you are saying if I learn UICollectionView, I can make apps

The content has been fully migrated form Medium to the personal iOS blog. If you wish to read the rest of the story, feel free to visit here.

--

--