by admin on November 24th, 2008

In a recent discussion with the UI designers for an upcoming iPhone application, I was asked if it’s possible to create an Alert that would overlay the splash screen, prompting for a username and password.

My original response (based on searching the documentation) was a regrettable, no. However, after some digging I did come upon an [...]

by admin on November 22nd, 2008

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.
When the icon for an [...]

by admin on November 19th, 2008

As I near the start of another iPhone project, one of the designers who is creating the UI asked about support for fonts on the iPhone. The question was posed from the perspective of matching fonts that currently exist on the client’s website with those in the upcoming iPhone application. Good plan, keep the look [...]

by admin on November 18th, 2008

Although NSlog is convenient for outputting messages to the console, I tire of the date/time and object information that it prints.
As an alternative, one can craft a macro that uses CFShow, which outputs Core Foundation objects to stderr. CFShow uses callbacks to objects to display their descriptions, which allows one to use “%@” like [...]

by admin on November 9th, 2008

In the first post on working with dates several of the examples use the “old style” date format syntax. The examples work, however, I want to show an additional example that uses the ICU (International Components for Unicode) library for format strings.

Here is a short list of sample formats using ICU:

The format specifiers are quite [...]

by admin on November 9th, 2008

In the first post on working with dates several of the examples use the “old style” date format syntax. The examples work, however, I want to show an additional example that uses the ICU (International Components for Unicode) library for format strings.

Here is a short list of sample formats using ICU:

The format specifiers are quite [...]

by admin on November 7th, 2008

With an understanding of C structures, and the definitions of CGRect, CGSize and CGPoint behind us, let’s look at a handful of functions for working with these structures.

CGRectMake and NSStringFromCGRect
With CGRectMake we can create a new CGRect structure. The rectangles below have differing starting points, however, each have a width and height of 100. The [...]

by admin on November 5th, 2008

In this third article on C++ programming on the iPhone platform, I will be covering RTTI, or Run Time Type Identification. This C++ language feature is often unsupported on mobile platforms due to the usual "code bloat" reasons. So, let’s take a look at the iPhone and see what it has to offer.
There are two [...]

by admin on November 5th, 2008

Digging into development of iPhone applications, you’ll eventually encounter references to CGRect, CGSize, and CGPoint. These references are to C structures (see this post for more information on structures). This post will provide a high-level view of what comprises CGRect and its counterparts. Here is how CGRect is defined:

struct CGRect {
CGPoint origin;
[...]

by admin on November 3rd, 2008

Leading up to a post on working with CGRect, CGPoint and CGSize, it makes sense to visit C structures. A structure is a collection of variables, grouped together to facilitate organization of data. For example, one might define a set of x and y coordinates as follows:

Creating a Structure

struct point{
int x;
int [...]