Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chhoda

macrumors 6502
Original poster
Oct 25, 2008
285
1
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);

regards
ch
 

jnic

macrumors 6502a
Oct 24, 2008
567
0
Cambridge
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).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.