views:

206

answers:

1

Hi all,

I have a requirement where UIPickerView should be customized. The picker view should look something like this:

alt text

The application which has customized the pickerView similarly is: http://itunes.apple.com/us/app/convert-the-unit-calculator/id325758140?mt=8

I have tried removing the default pickerView selection bar by resetting the property showsSelectionIndicator of UIImagePicker and adding a overlay view. But the problem is, the overlay view should be transparent so that the wheel behind it is visible. But the other application somehow does it even though the selection bar is not transparent.

Any ideas on how to achieve this feat?

Thanks and Regards, Raj

+1  A: 

You're going to have to write your own from scratch on this one. UIPickerview isn't customizable. At. All. Sucks, but that's how it is. I'd start out creating a uitableview and layering a frame around it, and trying to mimic uipickerview.

kodai
Thanks for the suggestion, but using table view are you sure that this feat is achievable? I mean, have you recognized any hurdles in achieving it?
Raj
I haven't been able to do it myself. But the only hurdle would be grabbing the selectedComponet. You should be able to do this by using contentOffset and calculating that way. I haven't done it, but I don't see why you couldn't. I'm pretty sure apple's uipickerview uses some sort of uitable as its means of presenting the cells.
kodai
Yes, customizing it is possible, but the only hurdle is changing the font colour. The font colour of part of the text which enters into the selection bar should be changed to white, the remaining part should be of original colour. Is this possible?
Raj