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…
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…
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,…
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…
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…
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.…
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…
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…
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)…
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…
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…
You must be logged in to post a comment.