View Full Version : custom slider

Nov 11, 2008, 05:10 AM
I am using custom picker from UICatalog. Unfortunately I am unable to get rid of the two gray rectangles that are coming when i add my custom picker to view. This also comes in UICatalog example app also, but looks manageable because custom picker's width is almost same. But here I want a thinner custom picker, so I want to get rid of that background. I am instantiating custom picker by initframe:cgrectmake(0,0,50,50);


Nov 11, 2008, 10:00 AM
I don't think UIPickerView was designed to be called with initWithFrame, and IB actively prevents you from resizing it when creating nibs. It seems you may be stuck with it like that.

As a hack, you could overlay other UI components to obscure the grey background (UIImageView + bringSubviewToFront, for instance).

Nov 12, 2008, 09:53 AM
Very Bad, What for the background comes at all ?