Archive for August 2011

Still patiently waiting

Well, I took the version 1.0 BvP app and turned this 1 batter vs. 1 pitcher app into a free app, and submitted this new app to iTunes Connect. They seem to be dragging their feet on this new app, as it has been over a week. App revisions seem to go much faster, it only took a few days when I submitted the 2.0 BvP app, which features the ability to have multiple pitchers vs. multiple batters. This is a much more useful mode for fantasy baseball or for statistical research.

BTW, Happy Birthday to John Boker. (Not the John Boker who played baseball for the Ogden Raptors, but “the” John Boker who was formerly a track star and also happens to be Ohio’s pre-eminent bacon tea connoisseur.)

Two superviews are better than one

So I have a table view that is built by using a custom cell that I built in Interface Builder and load up in my view controller. This UITableViewCell has a bunch of UIButton controls right off the root of the cell view in it that I need to snag the action on, and of course there can be a lot of cells in the table. In order to do this as compactly as possible, I wanted to just create one IBAction method, and funnel all button presses to that method. Then, inside the method, I would just read the tag of the sender to decide what button was pressed, and then back up one level to get the cell, ask the table for the index path of that cell, and then I would know which row to act on.

Well of course it did not work as expected the first time. For some reason, when I asked the table for the index path of the cell, it would always return a nil index path. So here is the final code that works.

UITableViewCell *cell = (UITableViewCell *)sender.superview.superview;
NSIndexPath *path = [contactsTable indexPathForCell:cell];

As I studied the problem, I discovered that the first superview off the sender does not get you far enough back, you have to go back another superview.

BTW, thanks to Leo Fender, born this day in 1909, for founding a company with such awesome products.

I Want My MP3 (Reprise)

Well, I gave in and uninstalled the official Twitter app from the Droid Charge, and what do you know, my MP3s play. I can now enjoy my ringtone of “The Analog Kid”.