Category Archives: iPhone

Deep Copying (Built-In)

I’d previously presented some code that made deep copies of plists. I recently discovered that this code is superfluous, due to the CFPropertyListCreateDeepCopy method. You can invoke this function with a call such as this: testData = CFPropertyListCreateDeepCopy(kCFAllocatorDefault, [NSDictionary dictionaryWithContentsOfFile:path], … Continue reading

Posted in iPhone | Comments Off

C99 Arrays

Today, I learned that a cool “new” C feature had snuck up on me. This was added in C99, and it has apparently been integrated into Objective-C (where I stumbled across it) as well. Briefly, this sort of thing is … Continue reading

Posted in iPhone | Comments Off

Taking Pictures

Today it’s just a quick note on using the iPhone’s camera to take pictures from within your app. They’ve made this really easy. Begin by reading the section in the iPhone Application Programming Guide that covers the UIImagePickerController class. That … Continue reading

Posted in iPhone | Comments Off

Core Graphics Problems (Update)

A while back I wrote about some Core Graphics code that gave rise to memory management errors when (a.) compiled for iPhone OS 3.0 and (b.) run on the iPhone Simulator; the core of the problematic code looked like this: … Continue reading

Posted in iPhone | Comments Off

NSFetchedResultsController pitfall

I’ve previously written about how neat I find Core Data’s NSFetchedResultController (NSFRC). Today, however, I must offer (another) word of warning. The documentation states that, if you set an NSFRC’s delegate: [T]he controller registers to receive change notifications from its … Continue reading

Posted in iPhone | Comments Off

Date Helper

As a followup to my earlier post on a “helper” view controller that handled the editing of long text fields, today I present a utility class that handles the editing of date fields. I hope you find it interesting.

Posted in iPhone | Comments Off

New Sections

A quick warning about the insertSections:withRowAnimation: method of UITableView. If you insert a section with this function inside a beginUpdates/endUpdates block, you should not insert rows into that section (with insertRowsAtIndexPaths:withRowAnimation:) inside the same begin/end block. Somewhat confusingly, the first … Continue reading

Posted in iPhone | Comments Off

P.G. vs. AAPL

Paul Graham discusses Apple’s iPhone App Store approval process in his latest essay. I think it’s fair to summarize the core of his piece as: The App Store approval process is opaque and frustrating Its bad design is driven by … Continue reading

Posted in iPhone, Jack Handy | Comments Off

@synthesize

When declaring properties that will be created with the @synthesize directive, it’s natural to use the same name for both the property and the backing member. Something like this: @interface MyClass : NSObject { NSString* value; } @property(nonatomic, retain) NSString* … Continue reading

Posted in iPhone | Comments Off

Table Cell Indentation

Just a quick iPhone note: The “Table View Cell” group of the “Table View Cell Attributes” pane in Interface Builder contains a checkbox labelled “Indent While Editing”. It seems to me that this should control whether or not the cell … Continue reading

Posted in iPhone | Comments Off