Learning iOS8 and Swift

My name is Tak and I’m involved with the sales and marketing aspects of Rob’s courses. And since it is my job to promote his video learning courses I thought it’s a good idea to get to know the products. Like you probably know Rob offers video tutorial courses on subjects like HTML, Javascript, PHP, Bootstrap as well as online learning for developing on iOS and the new Apple Watch using Swift.

I thought it would be a good idea to start with his online course developing apps for iOS and Swift. And for those who don’t know, iOS is what the iPhone runs on.

It’s been over a decade since I can say I’ve been involved in any type of programming of any type. This was using the C programming language and since then, a host new programming languages have become mainstream including PHP, Ruby and C# to name a few.

So yes I know programming concepts like variable types, conditions and loops but I still had to start from the very beginning to understand the features of Xcode, the toolset to do the Swift development.

Old habits die hard

I found myself doing things like putting a semicolon after each statement and putting brackets around simple if conditions. Luckily, Swift is very forgiving because although this practice is not wrong, it isn’t necessary.

How many fingers?

There are two relatively simple apps you develop initially. One is called Cat Years which allows the user to enter a number into the app which is multiplied by 7 and the second is a simple game where the app generates a random number up to 5 and you enter a number to guess that number and the app tells you if you have guessed the correct number or not.

So app development comes relatively early in the course after getting the hang of some basic concepts.

Errors.. Errors.. Errors..

Most of the errors I came across were a result of my lack of exposure to any programming language for such a long time. Luckily Xcode is really good at picking these up even before you try to run it. For example, if you are trying to use a variable which hasn’t been declared because you’ve either made a typo or forgot to declare it. Xcode will give you a friendly message ‘use of unresolved identifier’ and highlight it.

Error if you have not declared a variable.

Other errors I made were syntactical in nature, using the [ bracket instead of ( and vice versa. Most of these could be solved on my own by taking time to analyse what I did or comparing it to Rob’s solutions in his video tutorials.

However, one error which I really struggled with was when my app would not compile and run. It would exit with:

libc++abi.dylib: terminating with uncaught exception of type NSException

What did this mean?! I did have a suspicion. In my Storyboard I had ctrl, left clicked and dragged a label onto my ViewController to create variable but misspelt it. So I deleted the code from the ViewController and did it again. Then I changed my mind about the name and deleted it again. I suspected that there was some connection from the label to the variable I wanted to use. Re-creating my app from start again would probably of solved this but that was not an ideal solution.

Swift outlet error

So a lot of time was spent pondering how I would solve this. Luckily I have access to the creator for the online video course for iOS and Swift development. You can delete the referenced outlet and to do this all you do is, right click the object on the storyboard, in this case a label and a menu appears where you can delete the unwanted outlet.

On the picture on the right you can see that there are four referenced outlets. I just deleted the three where I had also deleted the variables in the ViewController. Happy days!

Don’t forget! Problems like this can be posted on the forums.

Onwards and upwards!

I’ve barely scratched the surface of what is offered on this involving course. There’s a cliche ‘learn by doing’ and with this programming video training course on iOS Swift video, it’s definitely the case. And I will be blogging my experience and progress with this course in the next few weeks.

Sales and marketing executive.
3rd degree black belt in Taekwon-Do.
Lives at the gym.
Enjoys burgers and cake.
Likes fast cars and lie-ins.

App Masters Podcast Episode

This week I was interviewed on the App Masters podcast - I really enjoyed speaking with Steve, and you can hear the whole episode below:

To go with my new Apple Watch Kickstarter, I’ve put together a 16-minute video on how to make an Apple Watch app. We’ll see how to add buttons and labels to your app, and make a simple guessing game similar to the ‘How Many Fingers’ app in my Complete Web Developer Course.

I hope you enjoy making your first Apple Watch app!

 

Student Story: Oliver Shi

Ever since the first iPhone came out when I was 6, I have been fascinated by its capabilities. I just had to get my hands on an iPhone. Of course, back then I was much too young to own an iPhone. Years passed, and on my 11th birthday I got an iPad. I was satisfied for the moment, but as more years passed my friends were all getting their own iPhones, so I just knew I had to get one. My dad refused to buy me one, since our family already owned three iPads, and I had a LG840G which was an extremely rudimentary phone.

Then, I heard about the iPhone 6 coming out in September of 2014 and I had to get it! So I asked my dad if he’d buy me one, and he replied that I had to prove that I deserved one.

Continue Reading

How To Get Super Sharp 720p Screencasts Using Camtasia on a Mac

I’ve struggled with blurry text when screencasting with Camtasia on my Macbook Air 11″, but figured out a neat way to get everything super-sharp. The video below will guide you through it. Enjoy!