Mat Murray

Menu Close

Swift development on the move

This is just a quick post to highlight a couple of apps I’ve started using on my new iPhone 6S Plus.

Quick few points on the new phone before we go any further though.

  • Firstly, the phone isn’t too big, and I’m used to the extra size already. Also the larger screen is really useful for the kind of apps I’m about to talk about.
  • 3D Touch is really, really impressive. Can’t wait for devs to include it in all their apps. The 3D Touch gesture that opens up multitasking without having to double-press the Home button is brilliant, as is all the ‘Peeking’ and ‘Popping’ of emails, messages, contacts, etc.
  • Touch ID insanely quick. So quick that you can’t pick your phone out of your pocket with your thumb over the sensor anymore, because the phone will be unlocked by the time you look at it. (in case you’re one of those people who like to turn the screen on to check the time.)
  • And finally, after last year’s gold iPhone 6, I’m glad to be back using a Space Grey phone. Looks good, man. Real good.

Anyway, back to the apps.

On Friday I was searching on Product Hunt for Swift-related things and I came across two apps for iOS that aim to teach you Swift away from your computer and Xcode. I’ve downloaded both of them, and they’re really impressive.

First: Swifty. This is the app I’ve put most time into. I love the colour palette, the design, and the app is really quick. I’m it really useful to have these short lessons and tasks on my phone. Now instead of checking Twitter, Instagram or Snapchat when I have a free minute or two, I can be learning Swift wherever I am.

Secondly there’s SwiftBites. I’ve done the first three lessons, and it seems really good, but just like I don’t do well when reading two books at the same time, I didn’t want to start two separate Swift coding apps at the same time either. But once I’ve finished all the lessons in Swifty, I’ll definitely go back to SwiftBites.

Both apps are free to download, but lessons (the first two or three are free, however) cost £2.49 for the remainder of the course.

I think these apps, where you’re learning code, the functions and the methods that power Swift are going to compliment Hacking with Swift really well. Hacking with Swift is very much about using Interface Builder and Xcode (obviously) so these apps give me a more thorough understanding on purely the code-side of Swift development.

Hacking with Swift – Project 3: adding a share button

Hacking with Swift has been built in a very specific way to give you the skills you need to be a Swift programmer. It does this by following a set of rotating lesson types;  you create an app, then a game, then you work on a technique.

This, being the third project in the series, means it’s a technique project, and we’re re-working Project 1.

This project was all about adding social sharing functionality to the photo viewer app,  and it was much shorter than the first two projects that came before it. It was really enjoyable though, and stupidly easy to add a link that shares your app/game/whatever to Facebook or Twitter. Here it is below.

Hacking with Swift - Project 3

Hacking with Swift – Project 3

Personally I wanted to add Share Sheet functionality to the app, allowing users to share to either Facebook, Twitter, LinkedIn, etc instead of choosing either Twitter or Facebook in the code, so I’m working on that now. I did manage to add the Share Sheet, but right now it’s opening up automatically when a user selects an image instead of when the user clicks on the share button. So that’s something I need to work on.


Hacking with Swift - Project 3 v2

Hacking with Swift – Project 3 v2



Hacking with Swift – Project 2: my first game

Managed to start and finish Project 2 in under three hours tonight. Which is a lot better than Project 1, which took me a couple of nights (but then I did have those Split Controller View issues)

The aim of tonight’s project was to build a ‘Choose a flag’ game. Players would be presented with three random flags, a name of one of the flags, and they had to choose the correct flag. The player’s score would increase if they correctly selected a flag, and decreased if they got a flag wrong.

Although I’ve finished Project 2, I actually want to go back now and make some improvements. Including the following:

  • A player’s score shouldn’t go down when they enter a wrong answer, it should remain the same prior to the question.
  • When a player chooses the wrong answer, the pop-up notification should inform the user which flag they chose (helping the user for next time)
  • The whole thing should have 3D graphics and a nu-metal soundtrack curated by Linking Park.

Here’s a gif of my handiwork.:

Hacking with Swift - Project 2

Hacking with Swift – Project 2

Hopefully I’ll have an update to this in the next couple of days, although I don’t know how good Chester Bennington and the rest of the band are when it comes to replying to emails.

Hacking With Swift – Project 1: my first app

Wow. My head is full of detailViewController, NSFileManager and UIImageView but I’ve just completed my first Project in Hacking With Swift.

I had some issues getting the split iPad view to work in the iOS simulator that forms part of Xcode, but after getting in touch with the guy who wrote the course, and some other messing about, I got there in the end.

I barely remember my own name right now, and I’m not sure how much I’ll be able to remember by tomorrow morning, but Project 1 went through a LOT of stuff. It covered the following: constants and variables, method overrides, table views and image views, app bundles, NSFileManager, typecasting, arrays, loops, optionals, view controllers, storyboards, outlets, Auto Layout, UIImage and more.

So I think that means I’m well on my way to becoming a Swift coding master. Or something.

Oh, and if anyone from Facebook is reading this, here’s what I’ve made. It’s an image viewer.

Hacking With Swift - Project 1

Hacking With Swift – Project 1

Let’s start the bidding at £40.

From reddit: advice for a swift beginner

This Reddit post from ohmydev on the Swift subreddit is fantastic.

There’s so much to take from this post. But going from nothing to a decent looking app live in the App Store within six months is pretty good going. Hope I can get that proficient within a year.

It’s Happening

It’s happening. I’m going to learn how to code in Swift, and I’m starting today.

I’ve watched a ton of videos on YouTube, been through the Swift subreddit, and even signed up to GitHub and StackOverflow (I don’t know what either of these do yet, but I’ve read that they’re important when learning to code.)

I’ve bookmarked a LOT of sites and courses to go back to, but I’m starting my journey into Swift app development by reading through Hacking with Swift, a set of project-based Swift tutorials from Paul Hudson.

Wish me luck. Or, you know, DON’T.

Learning to code

I’ll cut to the chase. I want to learn iOS development, and I’m going to use this site to blog about my experiences.

I won’t be learning Objective-C, instead I want to learn how to program in Swift; Apple’s very own modern and relatively new programming language, first unveiled at WWDC in June 2014.

I used to love programming back at school. Here I started coded in Basic and HTML, then college, where I progressed to Visual Basic and C++, and finally university, where I started and sadly dropped out of a Computer Games Programming degree.

But that was a long time ago, and now it’s 2015, where I’m obsessed with tech, apps, mobile and the incredible power of the web to connect people and tell stories. So why not harness that to build something good. My point exactly, so that’s why I want to learn something new and build something great.

Developing an iOS app has long been a part of my ever-growing list of “life goals”, so it’s time to do something about it. This would ordinarily form one of many New Year’s Resolutions, but it’s only October, so why wait. Fail fast, they say.

I’ve learned over the past few years that I’m very much an “all or nothing” person. I’m either going to not do something, or do it, do it, do it and never stop doing it until I’ve smashed every goal I ever set myself or something/someone died.

Whether it’s blogging every single day of the year (that was back in 2010) or trying to beat my daily move goal of 750 calories on Apple Watch (that was in August) it’s clear I like routine, and a daily fix to reach my goals.

That’s why I want to try and blog about my experiences, and make it into a daily routine. Even with a busy job and being a dad I still managed to find an hour each day to run, so I can find that time again to code and blog.

And if I’ve got some people reading this blog, it’ll keep me going on days when I would much rather just play Destiny on PS4.

© 2015 Mat Murray. All rights reserved.

Theme by Anders Norén.