Blog Archives

Farewell parameter var

In Swift 3.0, the var keyword in function parameters is being removed. Apparently there was too much confusion of var parameters with the functionality of inout parameters. For more information, see the Swift blog announcement, Swift Evolution proposal and swift-evolution-announce post. If you had

Tagged with:
Posted in Swift

Create a CocoaPod

In the previous post we created a dynamic framework. Now we’re going to share this code with the world, by turning it into a CocoaPod and uploading it to cocoapods.org: First, drag your whole project folder to Terminal, and create a podspec. In Terminal, type:

Tagged with: ,
Posted in Swift

Create a dynamic framework for iOS in Swift

Have you ever written some Swift code in iOS that you’ve thought, this could be way useful in other projects? One solution is to set up a Cocoa Touch framework – edit your source code in one place, compile your framework

Tagged with:
Posted in Swift

Looking back on 2015

2015 has been another great year. Under moniker Interactive Coconut I spent a lot of time working on new app Grabble Words, which launched at the end of the year. Technically Grabble Words delved into new areas such as Sprite Kit,

Posted in 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… 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