Voices That Matter

Archive for October, 2009

iPhone Developer Tips Stats:
Past 30 days - Pageviews: 88,766 Visitors: 61,679
Thank you everyone! Let's shoot for 100,000 by May. Pass it on...



iPhone File System: Creating, Renaming and Deleting Files

The iPhone provides a comprehensive set of operations for working with files and directories. NSFileManager includes methods for querying the contents of directories, creating, renaming and deleting contents, as well as getting/setting file attributes (readable, writeable, etc).
Point to the Documents Directory
Each application has its own sandbox in which you can read/write files. Files written to [...]

Data / File Management

Vimov and iSimulate – iPhone Developer Tool

I’m happy to announce a new sponsor of iPhone Developer Tips, vimov, the company behind an excellent developer tool, iSimulate.
In a previous post I wrote about my experience using iSimulate in an iPhone project I was working on at that time: Testing Multi-Touch, Accelerometer and GPS using the Xcode Simulator. In addition iPhone Developer Tips [...]

Tools

UIActionSheet to Display Text Only Messages

UIActionSheet offers a really handy basic menu system, where each button presents an option for the user to choose from. For example, the figure below shows how I am using UIActionSheet to show three menu options for a shopping list view I am working on.

General

Encapsulating Begin Ignoring Events and End Ignoring Events

There are times when it’s really handy to stop event processing momentarily so you can perform an update to the UI (e.g. sliding a custom view into place using a timed animation) or you otherwise need to save the user from themselves by momentarily stopping touch events.
I’ve written previously on How to Suspend / Ignore [...]

Event Handling

Killer Xcode Tips and Tricks – Tips 1 to 10

My world is surrounded by sticky notes, both electronic and paper, doing my best to keep track of Xcode shortcuts, tips and tricks. I strive to use the mouse as little as possible when coding, and without these tips I’d be lost. What better place to keep track of this stuff than to write about [...]

Xcode

How Long was a Touch Event – Detecting When a Touch Event Starts and Ends

Here’s a quick tip that shows how to determine the length of time from a begin touch event to an end touch event. I used a similar snippet of code recently when I had to determine if a user tapped on an image or held their finger on the image for a pre-determined amount of [...]

Event Handling

Where Does Xcode Simulator Write Files?

When working with Xcode and running apps in the Simulator, looking at files written to your system is often a necessity to verify all is well. For example, I’m working on a project at the moment that requires updating a plist (XML file) when the application exits. Once the content is written to the plist, [...]

Xcode

Tools for Creating iPhone Wireframes – OmniGraffle iPhone Stencils – Update Oct 2009

Just short of one year ago, I wrote about Omni-Graffle stencils to help create wireframes of iPhone applications. You can read more on the original post here: OmniGraffle iPhone Stencil.
Omni-Graffle and iPhone Stencils
The combination of OmniGraffle and custom iPhone stencils will save you oodles of time when designing and tinkering with iPhone user interface elements. [...]

Design

Sliding Views On and Off Screen – Part 2 – Reader Contributions

One of the more popular posts in the last few months has been Sliding Views On and Off Screen – Part 1 – Creating a Reusable Sliding Message Widget. The post inspired two developers to use the code example as a starting point to come up with a few different approaches to working with sliding [...]

User Interface

Creating Unique Looking Tables with Custom Cells

A reader of this post How to Add “More Content” Indicators asked about how the user interface was constructed for the Bikini.com application, the UI in question is shown below:

Creating a Custom Table
It’s quite simple to pull this together, it’s nothing more than a UITableView that is transparent so the background shows through. Each cell [...]

User Interface

Fast Enumeration on the iPhone

With the introduction of Objective-C 2.0, you can now iterate through collections (arrays, etc) with ease using a language feature known as Fast Enumeration.
This enumeration is both faster than using NSEnumerator and is also much more concise as it relates to the syntax, resulting in code that is easier on the eyes.

Objective-C

Fix for Troublesome User Interface (UI) Updates

Here’s a quick tip if run into the problem of requesting a UI update (changing label text, starting/stopping spinner) that just don’t seem to take place. This is a simple workaround and isn’t replacement if you need multiple threads given an unresponsive UI due to other time intensive tasks (such as network requests).
As an example, [...]

User Interface