Cocoa
Single, Double and Triple Taps
If you need to tinker with the threshold (time between clicks) when working with single, double and triple taps on the touch screen, one approach for this follows. What follows is a short example that demonstrates how you can manage the delay between taps.
Get Application Name
If you ever need to get the name of your application in code, for example, to display the application name across a navigation bar, it’s as near as the bundle for your application. The code to get the name is as simple as this: [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]; The breakdown is as follows:
NSNumber versus NSInteger
If you’ve ever found yourself scratching your head thinking “now which one should I be using, NSNumber or NSInteger?” the short summary below should help. NSInteger is nothing more than a synonym for a long integer. What follows is how NSInteger is defined:
Read and Write User Preferences
Reading and writing user preferences within iPhone applications is surprisingly easy given the NSUserDefaults class does most all the work for you. What follows is a short example to show how you can read/write two values, a boolean and an integer. The example assumes you want to save state as to whether a user wants [...]
Launching Your Own Application via a Custom URL Scheme
One of the coolest features of the iPhone SDK is an application’s ability to “bind” itself to a custom URL scheme and for that scheme to be used to launch itself from either a browser or from another application on the iPhone. Creating this kind of binding is so simple, its almost criminal not to [...]
Launching Other Apps within an iPhone Application (Part 2)
To continue on the types of URL Schemes that are supported by the iPhone (see Part 1); today I will show you how to: Launch YouTube “Deep Link” to content in iTunes
How to Mask an Image
Masking an image enables a developer to create images with irregular shapes dynamically. Masking is often used to create a user interface that is more compelling and less boring. Take for example the following example …
Date Formatter Examples – Take 3: Date from String
While working on an iPhone application recently, I needed to convert a date read from an XML stream that was in the following format: 20081122 to a nicely formatted string for display on the device: Saturday November 22, 2008.
“Default.png” the secret of the load screen …
Ever wondered how all of the applications on your iPhone seem to show a loading screen or “boilerplate” as soon as the icon is touched and wondered how they get the image to appear quickly? Well the secret is in the presence of a file in your application called Default.png.


