Apple provides classes to make it easy to let your user select somebody from their iPhone's address book (aka the Contacts application), or to add a new person to their address book. But in an exceptionally rare example of a complete UI miss on Apple's part, there is no easy way to let the user add a new contact when you are prompting them to select an existing person. You have to know beforehand whether they're going to select an existing person, or add a new one. You can't just give them a single + button in a table and easily do both.
Here's what the UI for selecting an existing person looks like:
So... why couldn't we just have the currently-blank left bar button item be an "add new contact" (+) button that dismisses the address book and presents the UI for adding a new person? Why make us go through two separate steps. I mean, not everybody knows exactly who is already in their address book off of the top of their head.
Anyway, I spent some time poking around the header files and the class-dump of the Address Book frameworks trying to see if I could implement this functionality myself, but I started getting way into the realm of disallowed private methods so, out of fear of getting my client's app rejected from the App Store, I gave up. My temporary solution is when the user cancels their selection, I prompt them with an Action Sheet to see if they want to add a new person since they didn't select find one from their address book. It's a little ugly, but better than cluttering up my interface with an additional button. Adding a contact is something people are, most of the time, going to do once, so I really don't want to lose the space to another button.
I opened an enhancement request on this: rdar://6517666
Thursday, January 22, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment