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.

Continue reading

Posted in iPhone | Comments Off

Navies

Do you ever stop to think about navies? Mostly just guys on boats, right? That’s what I used to think, until I began to notice some things about the U.S. Navy.

Continue reading

Posted in Jack Handy | Comments Off

Waste

So, “Cash for Clunkers”. As I understand this program, the gov’t will pay $4500 for certain trade-ins, if:

  • The old car gets under a certain mileage
  • The new car gets over a certain mileage
  • The old car is destroyed

As economic policy, this is a sick joke.

Continue reading

Posted in Jack Handy | 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 code should live; assigning it to any one VC was a non-starter, and, since I was using pure plist data structures (NSDictionaries, NSArrays, etc.) as my models, it didn’t seem natural to add the code to them, either.

In the end I decided to stick the code into the Application Delegate, but I felt guilty about it.

Posted in iPhone | Comments Off

Fish School

Fish school is just too cool – and a stunning rebuke to anyone who’s ever claimed that fish are dumb! (3s memory, etc.)

Continue reading

Posted in Jack Handy | Comments Off

New Hampshire

New Hampshire has got one of the world’s best mottoes: “Live Free or Die”. Unfortunately, via Steyn, I learn this:

“The Governor’s Task Force for the Recruitment and Retention of a Young Workforce for the State of New Hampshire” [quoted testimony] in its official report [stating that]: “Our State portrays an unfriendly message that every individual has to succeed on their own, rather than count on a support system for assistance (Live Free or Die is not a friendly, supporting message that appeals to young people).”

There’s much to be dismayed about here, but, just for starters:

Continue reading

Posted in Jack Handy | 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 to share your DB connections; I provide a simple class for that purpose.

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 manipulating that nav. controller in complex ways.

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.

Continue reading

Posted in iPhone | Comments Off

The Cat Post

catI believe that, if you have a blog, not only are you allowed one post about cats, you are actually required to have (exactly) one post about cats. This is mine. I hope you enjoy it.

Continue reading

Posted in Jack Handy | Comments Off