Archive for March, 2009

Custom UIAlertView with UITableView

Thursday, March 26th, 2009

I have been working on a story: “As a user, I should be able to search for hotels around a given location so that I can add the hotel to my trip.”.

I built my basic form for the user to fill out the location information and provided my awesome continue button to get hotels:

locationform

I quickly realized that the user’s location could be resolved to more than a single place. If the user entered in county: US and then city: Greenville, there would be 10 or so matches. I would need the user to choose which was the correct city. One way to do this would have been to take the user to a new UITableViewController with all the matches and ask the user to choose a match, then pop then continue on to find the hotels around the selected location. While this would work, I dont like it. What if it worked like Google Maps? The Google Maps application shows the user a UIAlertView with an embedded TableView. It’s pretty clean. It works well because the user does not need to go to a separate page to choose a location match. I want my user to have this same experience.

If you have used the UIAlertView much, you know it is very limited on custimization opportunity. I decided to subclass UIAlertView to build my new location selector. I ran into a few “a ha” moments when trying to mimic the Google Apps look and feel. First, their UIAlertView has rouned top and bottom corners that are independent of the TableView. They are actually using a PlainStyle TableView and when you scroll the table in the alert, the table looks like it is sitting inside of a rounded rect UIScrollView. Tricky Indeed!

Our solution was to use some transparent rounded corners with a dropshadow on the top image. We also wanted the height of the custom alert to be dynamic based on the size of the embedded UITableView. However, UIAlertViews do not have a frame or height property. The height of the UIAlertView is based on the length of its message property. Our solution to this problem was to identify the number of rows in the table and add return characters to the message property of the UIAlertView.

Here is what it ended up looking like:

locationresults

Offline Mode, the magical land of disconnection

Tuesday, March 10th, 2009

I have been working on providing an “Offline” mode for TripCase.  TripCase’s strength is its ability to organize mounds of data so that you, the traveler, can look to one place for your travel data.  While that’s all awesome and cool, it introduces a pain in managing that data while you are “disconnected” from your favorite carrier or are not in the range of your favorite coffee house wifi.

Our approach for TripCase is to cache data as its received to the phone.  So if you have seen the weather, or looked at your trip, or added posts to your TripLog, etc.  we store the last received inormation on the phone.  When you start the phone, we check for network connectivity and if we are unable to get a connection, we push you into our Offline Mode.  The UI changes slightly with a simple logo treatment letting you know you are now in offline mode.  Your trips and the surrounding data is there for you to view.  This allows you to open up TripCase while in flight or while disconnected and still get your last known information regarding your trip.  Also as a bonus, we actually send the iPhone more messages than we show you on your Main tab.  This allows us to deliver messages to you while offline.  Its really an “Almost Online” feature rather than Offline.

We also protect you from performing actions that are not allowed in Offline mode. Since you are disconnected, you should not have the ability to change your data (i.e. delete your trip, add a new TripLog entry, delete trip segments, etc.).  We alert you when you attempt to perform an action not allowed in Offline mode.

Offline is going to allow our customers to utilize our app whether they are connected or not.  To some, it will be almost transparent and possibly not even noticeable.  We hope they get a “wow how did I get a message while in Offline” feeling as they see new messages show in their Main tab while in flight.

Countdown is on…

Wednesday, March 4th, 2009

So we’re days away from final submission to Apple. We’re pretty excited, tired, anxious and giddy all at once.

Our team has spent several months on iteration planning, design mocks, copy points and branding. We just want it live already! Having a third party be *the* dependency on go/ no-go is unusual for us, so it’s been a good learning experience.

Our beta testers have given us valuable feedback and have helped mold the final features you’ll see day 1 on iTunes.

Can I Have My Money Back?

Wednesday, March 4th, 2009

Although iTunes Store states that all sales are final, dissatisfied customers can plead their case to Apple and possibly get a refund. When that happens, you see it reflected on your daily sales trends reports as negative units sold.

If you see a lot of those, that means that there is a problem. Usually the sales volume and customers’ rantings in the review section are better indicators of the quality of your product. Negative units sold just add insult to injury.