Tips for Getting Started with iOS

I’ve had quite a few developers ask me for tips on getting started with iOS. The following are the tips and resources I wish I knew about before starting my own journey with iOS. Keep in mind that in building an iPhone or iPad app there are 2 technologies you need to master: iOS – […]

Tags: iOS, Objective-C

C99 Initializer Syntax in Objective C

This week a colleague sent me a snippet of Objective-C syntax I had never seen before. self.imageView.frame = (CGRect){.origin=CGPointMake(0.0f, 0.0f), .size=image.size}; This is (apparently) called C99 Initializer Syntax. This type of syntax can be used to initialize any struct in C (and Objective C) which is especially useful when working with CGRect and CGPoint. The […]

Tags: iOS, Objective-C

Mobile Web versus Native Apps

The topic of mobile web versus native apps comes up quite often. The typical scenario is that of a company who already has a web presence and wants to bridge the gap to be more engaging to mobile users. The challenge is then to decide which platform (or platforms) to support. The company is now […]

Tags: HTML5, iOS

The Problem with Interface Builder

Most iOS developers seem to have a love-hate relationship with Interface Builder: they will either use Interface Builder for everything or completely avoid it and do everything in code. Example Let’s take a look at a simple example where using Interface Builder can be painful. I’m going to create a simple view in Interface Builder […]

Tags: iOS, Objective-C

Using Multiple ViewControllers on a Single Screen in iOS

In the world of iOS we usually stick with a single ViewController per screen. In fact, this is so common that many developers are not even aware that it’s possible to use more than one ViewController on a single screen. I’m going to run through a quick example and then highlight some of the benefits […]

Tags: iOS, Objective-C

Record and Playback Audio in iOS

On my last iPad project we needed the ability to record a sound clip and then play it back to the user with some visualizations. This is relatively easy with AVFoundation, but – as with many things in iOS – it takes quite a bit of boilerplate code to get it working. Recording To get […]

Tags: iOS, Objective-C

Thoughts on Parse

Parse is a cloud-based storage framework for iOS applications. Parse supplies an SDK for your application that allows you to easily push and pull data from the cloud-based platform that they provide for you – it’s all included. With any kind of persistence on a mobile device comes the obvious problem of offline support – […]

Tags: iOS, Objective-C

Automated iOS Testing with Zucchini

This week I was looking for an appropriate testing framework for the iPad app I’m working on. I say ‘appropriate’ because the app is rather unique in that it’s very content driven and therefore it’s difficult to write tests that catch regression bugs. We had already integrated Frank and Kiwi into our app with limited […]

Tags: iOS, testing, Zucchini

Literals in Objective C

Objective C is not a pure Object-Orientated language, which means you often need to convert between primitive/basic types (like char or int) and objects (like NSValue or NSNumber). This is usually rather tedious and results in large amounts of boilerplate code. animation.fromValue = [NSNumber numberWithDouble:0.0]; animation.toValue = [NSNumber numberWithDouble:2*M_PI]; This is especially true when dealing […]

Tags: iOS, Objective-C

Extending classes in Objective C using Categories

Yesterday I had to perform the simple task of shuffling an array in Objective C. There is unfortunately no built-in method to do this (which is a bit strange) which meant I really wanted a way to add a shuffle method to the NSArray class. In C# I would use an extension method to do […]

Tags: iOS, Objective-C