0

I want an UIPickerView that fills all the screen. This is the code i have ...

pickerView1 = [[UIPickerView alloc] init];
[pickerView1 setDelegate: self];
[pickerView1 setFrame: CGRectMake(0,0, 480, 320)];
[self.view addSubview: pickerView1];

This just fills the width, not the height, and I get this message in the output: " invalid height value 320.0 pinned to 216.0 "

Why ? How can i adjust the height of the picker ???

Fischer
  • 1,513
  • 4
  • 17
  • 38

2 Answers2

1

You just can't adjust the height of a UIPickerView. Check this topic for more information : here

However, you can change the width.

Community
  • 1
  • 1
Snaker
  • 735
  • 9
  • 20
1

I don't believe you can increase the height of a picker view beyond a certain point.(not sure what that is though, but its around 240 max) Not sure if its because of the example, but your W and H are inverted, so your picker goes off the screen because of that.

UIPickerView *pickerView1 = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 240.0)];
AJak
  • 3,863
  • 1
  • 19
  • 28