Nirma
Nirma

Reputation: 5790

How to control the Appearance of UIPickerView

Can anyone point me in the right direction here. Im trying to use a UIPickerView that is displaying images. The images are too big for the default pickerview setup so I was wondering how I could control how big the rows in the UIPickerView are and how wide the translucent selection bar is to accomodate for their custom size.

Can anyone provide some guidelines as to how big I should make the row images or where a good tutorial / book chapter is on this?

Thanks!

Upvotes: 2

Views: 717

Answers (1)

Chip Coons
Chip Coons

Reputation: 3201

Why not use the UIImagePickerController instead of trying to customize a UIPickerView? It is designed to enable you to allow the user to pick from their library of images if you use the sourceType of UIImagePickerControllerSourceTypePhotoLibrary.

There is sample code on how to use this controller at http://zcentric.com/2008/08/28/using-a-uiimagepickercontroller/

If the images are not from the user's library, then I would suggest you scale the images down to fit the constraints of the UIPickerView, or use a tabelView with the images laid out in it for the user to select.

Upvotes: 1

Related Questions