Blog Archives

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

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

COMMUNICATION BETWEEN OBJECTS IN OBJECTIVE C AND SWIFT COMPARED WITH ACTIONSCRIPT – PART 5

Events Well, this is the final blog post in the series of communication between objects and for something familiar, events are available in Objective C and Swift too. The equivalent of ActionScript’s EventDispatcher is called NSNotificationCenter. Rather than each display

Tagged with:
Posted in Flash, Objective C, Swift

COMMUNICATION BETWEEN OBJECTS IN OBJECTIVE C AND SWIFT COMPARED WITH ACTIONSCRIPT – PART 4

Blocks/Closures Blocks are another way that Objective C performs callbacks. Flash and Swift uses this technique as well, where they are called closures. Basically this involves passing in a function/method/message to the child, whilst maintaining the focus of the parent.

Tagged with: ,
Posted in Flash, Objective C, Swift

Communication between objects in Objective C and Swift compared with Actionscript – part 3

Delegates Rather than passing the method itself to be called back, another callback strategy is to pass in an object that contains the callback methods. Delegation is such a design pattern, another way that children in Objective C and Swift

Tagged with:
Posted in Flash, Objective C, Swift

Communication between objects in Objective C and Swift compared with ActionScript – Part 2

Actions in Objective C and Swift One way that Cocoa implements callbacks using Actions in the Interface Builder. Some display objects can call actions in your ViewController. You can connect the object to a method in your custom ViewController class

Tagged with:
Posted in Objective C, Swift

Communication between objects in Objective C and Swift compared with ActionScript Part I

When I began using Objective C, coming from ActionScript, I was a little overwhelmed at the myriad ways that a child component can send messages to its parent. ActionScript seems sort of easy now, since generally (at least since AS3)

Tagged with:
Posted in Flash, Objective C, Swift

Subtitles Viewer available on the App Store

An app I’ve been working on, ‘Subtitles Viewer’ is now available on the App Store! Click here to download. Subtitles Viewer allows you to download subtitles on your iOS device, and then watch the subtitles synched to the movie/television show

Posted in Objective C

Punctuation in RTL text in Objective C

In the subtitles project I’m working on, I had the need to display Hebrew and Arabic, both RTL (right to left) languages. Having not worked with RTL text before, I wasn’t aware of the headache they can be, especially when

Tagged with: , ,
Posted in Objective C