Blog Archives

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

Looking back on 2014

2014 has been a great year, where I have made the transition from Flash to native iOS development and set up Interactive Coconut. Finished the year heavily involved in writing the Swift course for Thinkful, with interactive coconut in full swing,

Posted in Flash, Objective C, Swift

7 common GOTCHAs for when you’re starting out with Flash Actionscript

I was thinking the other day about the process of learning Swift and how a list of common gotchas would have been handy when starting out. Since I have about 15 years of experience in ActionScript I thought it might

Posted in Flash

Swift – a history of the inspiration for ‘new’ concepts!

In studying Swift initially, I was quite interested to read about concepts that I wasn’t familiar with, and curious to know if these were brand new concepts invented by excited Apple engineers, or if they were inspired from other other languages.

Tagged with: , , ,
Posted in Swift

Parameter defaults and Optional function parameters in Swift

This post has been updated for Swift 3.0 here. This post has been updated for Swift 3.0 here. Swift has an interesting multi-pronged approach to dealing with default and optional function parameters, based in part on its relationship with Objective C and

Tagged with: , ,
Posted in Swift

Popups, Popovers, Pushing, Popping, Presenting, Alerts and Actionsheets!

All the options for popups and displaying View Controllers can get a little confusing at times. I’ve put together a project that summarises the various options. The app contains four tabs: Alerts/Actionsheets Popover Modals (presentViewController) – with options for playing

Tagged with: , , , , ,
Posted in Swift

How to create a concave SKPhysicsBody

I’m building a game using SpriteKit, and using the brilliant SKPhysicsBody Path Generator. I came across a limitation of physics bodies, that their shapes need to be convex, or an error is generated(strangely, the simulator doesn’t seem to mind, but

Tagged with:
Posted in Objective C, Swift