Category Archives: iPhone

objectAtIndexPath:

I’ve praised the amazingly useful NSFetchedResultsController before, but today I want to point out a tiny little problem with this class, or at least its documentation. Briefly, objectAtIndexPath: will sometimes return objects for invalid index paths.

Posted in iPhone | Comments Off

Table Updates & Scrolling

I want to follow up on a post from a few weeks ago; I’d posted some code that demonstrated how an NSFetchedResultsController could be used to automatically update a UITableView when the data in a ManagedObjectContext were changed. Unfortunately, that … Continue reading

Posted in iPhone | Comments Off

Deep Copying (Bug Fix)

A few months ago I wrote a short piece on creating deep mutable copies of plist data structures. Today, a (modestly anonymous) reader was kind enough to write in with a bug fix, which I would like to share with … Continue reading

Posted in iPhone | Comments Off

Quickie: Core Data “Scratchpads”

The Cocoa Core Data documentation makes frequent reference to the fact that Managed Object Contexts (MOCs) are “scratchpads“, in which objects can be moved around willy-nilly without affecting the permanent store. This is all well and good, but it leaves … Continue reading

Posted in iPhone | Comments Off

Housekeeping

Today I just want to take care of a little administrivia. I’ve piled up a fair number of posts related to Shiny Red Buttons, but they’re scattered a little randomly throughout the blog. Therefore, I pulled together a page devoted … Continue reading

Posted in iPhone | Comments Off

SMS Bubbles

Talking with Benoit Cerrina (of ShinKanji) about a related issue, I started to wonder how you could render “bubble” text, as for instance in the SMS application. It turns out to be pretty easy; all you need is a little … Continue reading

Posted in iPhone | Comments Off

Fitted Labels

A recent problem required me to find bounding boxes for text on the iPhone. While this problem is neither typical nor particularly hard, I did spend some time digging though the documentation until I found an approach that I was … Continue reading

Posted in iPhone | Comments Off

Core Data

One of the developer-side enhancements included in iPhone OS 3.0 was Core Data. Core Data is basically an ORM layer, which one could either take or leave; it’s nice to avoid writing all that SQL, but you’re always taking on … Continue reading

Posted in iPhone | Comments Off

Fixed-Width

This one is a little personal. I have an idiosyncratic, and probably ill-advised, interest in getting ASCII art to display properly on the iPhone. (This was actually one of the first things I experimented with on the platform.) My efforts … Continue reading

Posted in iPhone | Comments Off

More Choices

I want to follow up on Monday’s post about my ChoiceMenu class; that class contained one particular line of code that made it a lot more useful and flexible. Perhaps I’m inordinately proud of it, but I think it’s worth … Continue reading

Posted in iPhone | Comments Off