Resizing a picker view?

Discussion in 'iOS Programming' started by jsnuff1, Aug 5, 2008.

  1. macrumors 6502

    Joined:
    Oct 4, 2003
    Location:
    NY
    #1
    Do picker views only come in on standard size? Id like to change the height of on of my pickers because it currenty takes up half the screen, but when i make my own frame for it its comes out all messed up. Does this code look wrong?

    CGSize temp;
    CGPoint temp2;
    CGRect temp3;

    temp2.x = 0;
    temp2.y = 0;
    temp.height= 160;
    temp.width=360;
    temp3.origin = temp2;
    temp3.size = temp;

    myPickerView = [[UIPickerView alloc] initWithFrame:temp3];
    myPickerView.frame = [self pickerFrameWithSize:temp];
     
  2. thread starter macrumors 6502

    Joined:
    Oct 4, 2003
    Location:
    NY
  3. macrumors 6502

    Joined:
    Jan 20, 2008
    #3
    I believe the UIPickerView has a set height and width. You can change the size of the components and rows, but not the frame of the UIPickerView itself.
     

Share This Page