Validation and Alert

This a bit of a simple one, but one that I end up looking up all the time. Say you have a text field, but it is saved in your model as a NSNumber. Before conversion, you need to ensure the user has entered in a number and not something silly like ‘cow’. What we..

Read more

Add option for Core Data to Tab Bar template in XCode

When starting a new project with XCode, you are often given the option to add CoreData to your project. I build almost every project using CoreData in some way (given most of my apps are business related, there needs to be some form of caching or data retention). However, for some reason, the option to..

Read more

Activity indicators (UIActivityIndicatorView)

I find it frustrating to be staring at a screen, with nothing changing, nothing responding, being not sure if there is something happening behind the scenes, or if the app has crashed. It doesn’t take much effort to pop up an activity indicator to let the user know on the UI that the app is..

Read more

Using NSUrlConnection in iOS

Quite often in my builds I need to get some information from an exposed webservice. Here’s an easy way of doing it with the iPhone API. In the interface declaration, add a NSMutableData for us to put the response data into: NSMutableData *responseData;NSMutableData *responseData; Then in the viewDidLoad, initialise it: responseData = [[NSMutableData alloc] init];responseData..

Read more

Working out time until next EKEvent

I had a need during a recent app build to find out the time until the next recurrance of an event that I had saved. You think that there’d be something in the API, right? Um, no. Here I’m sharing with the community the solution that I ended up building myself. I had a UILabel..

Read more

Create an Event with EKEventKit in iOS

EKEventKit is a somewhat recent addition to the iPhone SDK, and allows an app to set, delete or edit items in the iPhone calendar. This can be handy if you have an app that requires prompting the user for an action at a given time. Recently Blue Sun Software completed and deployed an app for..

Read more