Category: Swift
-
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……
-
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…
-
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…
-
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: [sourcecode language=”javascript”] class Font { var…
-
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…
-
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…
-
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…
-
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…
-
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…
-
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…
