Category Archives: iPhone

Table View Scrolling

Today I want to cover a small problem with the UITableView method scrollToRowAtIndexPath:atScrollPosition:animated. This method doesn’t work quite properly when called from an out-of-the-box UITableViewController on a navigation controller’s stack. Some special setup is needed.

Posted in iPhone | Comments Off

Shared Code

While working on an iPhone app, I had occasion to create some ‘utility code’ – functions that were used by several view controllers, but that didn’t really belong to any one in particular. It wasn’t clear to me where this … Continue reading

Posted in iPhone | Comments Off

Transactions

I’ve become a big fan of SQLite on the iPhone. One nice feature of SQLite is its transaction support; this lets you commit application state changes to disk in an “all-or-nothing” manner. To use transactions effectively, however, you may need … Continue reading

Posted in iPhone | Comments Off

navigationController

Today, a quick note on an iPhone gotcha that recently bit me. The short version is that a UIViewControler’s navigationController property is cleared when that view controller is removed from its nav. controller, which can trip you up if you’re … Continue reading

Posted in iPhone | Comments Off

Quickie – Two Useful Classes

UIActionSheets and UIAlertViews are two slightly obscure but very handy classes that can give your iPhone app a more polished appearance with very little effort. They’re worth the few minutes it takes to read up on them.

Posted in iPhone | Comments Off

Pointers

If you work with C, or C++, or Objective-C (or C#, boo, hiss) you work with pointers. Today, I want to argue that the way everyone else declares and thinks about pointers is wrong, wrong, wrong!

Posted in iPhone | Comments Off

Shiny Red Buttons (6.2)

Last week we began to look in detail at the backgrounds of some of the iPhone’s built-in shiny buttons. We saw that those backgrounds were really simulated 3-D grooves in the control’s parent’s surface, and that they were comprised of … Continue reading

Posted in iPhone | Comments Off

SQLite Gotcha

Working with SQLite on the iPhone, I ran across a strange (to me, anyway) interaction between prepared statements and transactions. This interaction (which I’m not sure it would be fair to call a “bug”) was causing DB writes to take … Continue reading

Posted in iPhone | Comments Off

iPhone and SQLite

Although Apple’s documentation doesn’t make too much of the point, the iPhone offers full support for SQLite. If you’re comfortable with DBs, this can be a timesaver, even for some problems for which a DB might seem like overkill. (In … Continue reading

Posted in iPhone | Comments Off

Shiny Red Buttons (6.1)

Editorial note: This is the first of several posts covering shiny button backgrounds. I’m breaking the topic up in order to keep the posts shorter. Also, today’s post is up a little late, due to another project. My apologies. If … Continue reading

Posted in iPhone | Comments Off