0

i am i need to reduce size of UIPickerview.

for that i use this code

picker = [[UIPickerView alloc] init];
picker.frame = CGRectMake(0, 0, 100, 100);

it is not reduce in os 4.0 and i test it in os 3.0 then it is reduced.

what the wrong,how can i reduce size of UIPickerview in iphone os 4.0.

can any one please help me.

Thank u in advance.

Mahesh Babu
  • 3,395
  • 9
  • 48
  • 97

1 Answers1

0

See How to change UIPickerView height

Community
  • 1
  • 1
benwong
  • 2,226
  • 1
  • 16
  • 14
  • hey i check that...i know google searching,i does n't satisfy with that solution,that's why i place question here.In ur link onr code is for table view another one is date picker,but i need size reduce UIPickerview in 4.0. – Mahesh Babu Jan 26 '11 at 06:13
  • 1
    Technically Apple doesn't support resizing the UIPickerView. Changing the frame size used to work, but looks like Apple have disabled that workaround. If they're going out of there way to stop you from doing something that means you probably should think about trying something else. – benwong Jan 26 '11 at 08:04
  • can u please suggest alternate way – Mahesh Babu Jan 26 '11 at 10:07
  • I assume you want to reduce the size of the picker because you want to fit more controls in the ViewController. You could have the UIPickerView on a separate ViewController or have it appear on the same ViewController by making it appear and disappear like the keyboard. – benwong Jan 26 '11 at 12:20
  • i need to display on a separate view which is subview to the main view.And i need to fix it,i mean not making it appear and disappear – Mahesh Babu Jan 27 '11 at 03:36