Monthly Archive for July, 2009

Resizing views around the keyboard

Most of my iPhone apps need to accept keyboard input somewhere and that means I need to reposition my UI elements such that the keyboard does not hide the field the user is typing in. The iPhone Application Programming Guide offers one example of Moving Content That Is Located Under The Keyboard but this is not necessarily the best solution.
Continue reading ‘Resizing views around the keyboard’

Loading UITableViewCells from a nib file

While working on iPhone applications I have found it useful to load as much of the UI layout and styling from nib files as possible. As a result I often want to load the cells for a table view from a nib file and created a factory class to handle this behavior every time I want to reuse it.
When I need to use a custom cell in a table view I add a cell factory as a property on the view’s controller and select a cell to use by setting that property when constructing the controller. This often allows me to reuse a single factory across multiple controllers so I don’t have to repeat myself by including duplicate references to the same cell nib in every controller.

Continue reading ‘Loading UITableViewCells from a nib file’

iPhone gesture recognition

I recently needed to support some basic gesture recognition in an iPhone app. As it turns out this is a little bit tricky to do when the touches occur within the same responder chain as a view which already responds to touches (like a UIScrollView or UIWebView which might need to scroll or zoom in addition to handling my custom gestures).
Continue reading ‘iPhone gesture recognition’

Resizing UILabel to fit text

UILabels are often the most convenient way to display simple text in an iPhone app however I often want a label to display variable text which may need to wrap to multiple lines. Simply increasing the height of the UILabel doesn’t help because a single line of text will be centered vertically within the label’s bounds. Instead I need to computer the size of the text I want to render and update the label’s frame’s height accordingly.

In most cases I want to adjust the size of not only a label but the view containing that label as well so I wrote a category to resize labels and their parent views.

Continue reading ‘Resizing UILabel to fit text’

Vinfolio Launches Collector Marketplace

Vinfolio announced today the launch of Vinfolio Marketplace where wine collectors can buy and sell wine from their private cellars.

According to Steve Bachmann, Vinfolio CEO, the marketplace includes 27,000+ unique items already marked for sale – more than 170,000 bottles with over $20 million estimated retail value. That’s far more than any retailer/auction house on the day the marketplace opens.

Carbon Five worked with Vinfolio years ago to create and launch their groundbreaking procurement and storage service for wine collectors. It’s great to see that they continue to push their industry by creating new ways for wine lovers to sell, acquire and enjoy wine.