Blog Archives

How to Invite Facebook Friends to Install Your iOS App

After six months of work, Grabble Words launched this week – hooray! But – I’ve just discovered it contains an important bug – inviting Facebook friends to install the app doesn’t work – boo… It all stemmed from a misunderstanding of the Facebook

Tagged with: ,
Posted in Swift

Swift API for the Flash Guy

Flash. The ‘f’ word. At least it feels like a dirty word right? Flash really spiralled out of fashion since Steve Jobs’ famous “Thoughts on Flash” open letter five years ago. Wired posted an article last month titled “Flash.Must.Die”, the

Tagged with: ,
Posted in Flash, Swift

Best practices differences between Swift and ActionScript3

There are the obvious technical differences in Swift compared to other languages such as ActionScript – optionals, strict data typing, namespacing, syntax, etc. What I find interesting though is where there aren’t technical differences, but there are differences in approach,

Tagged with:
Posted in Flash, Swift

Ambiguous convenience initializers

I was just setting up a class with a designated initializer and a convenience initializer to be able to pass in initializing properties beyond the defaults: Great, all good so far. But sometimes a Font will be instantiated with a

Tagged with: ,
Posted in Swift

Parameter defaults and Optional Function Parameters in Swift 2.0

This post has been updated for Swift 3.0 here. This post has been updated for Swift 3.0 here. There are some changes in Swift 2.0 to Optional Function parameters, so I thought I should revisit this blog post. For info just on

Tagged with: , ,
Posted in Swift

Func parameters in Swift 2.0

This post has been updated for Swift 3.0 here. This week func parameters were simplified in Swift 2.0. The hash symbol was deprecated for specifying a parameter should be explicitly named, and the rules were simplified concerning global functions vs

Tagged with:
Posted in Swift

AS3 in Swift? Whaa?

This week I thought it could be an interesting exercise to write the AS3 SDK from within Swift, using SpriteKit. So I did! Remember DisplayObjects? MovieClips? EventDispatchers? gotoAndPlay? They’re back! Some might call it crazy, some might call it heresy,

Tagged with:
Posted in Flash, Swift

Multi line SKLabels in Swift

Updated for Swift 3! Sometimes Apple seems to have made some pretty obvious oversights – a SKLabel without multi-line capability? Strange. I’ve had a look at some third party solutions and each seemed to have their own limitations. Here is

Tagged with:
Posted in Swift

SKTexture gradient

SpriteKit at times can seem a little rudimentary – small tasks can seem to take longer than they should! Today I ran into a limitation of SKShapeNodes – there doesn’t seem to be a default way to set up a

Tagged with: ,
Posted in Swift

Localization playing nicely with string interpolation in Swift

I can’t work out why Apple’s documentation of Swift core data types is still so poor, but luckily we have Swiftdoc. To illustrate, according to Apple docs there are two init methods for String. If you want to know the

Tagged with: ,
Posted in Objective C, Swift