UIPicker

Discussion in 'iOS Programming' started by chhoda, May 17, 2010.

  1. chhoda macrumors 6502

    Joined:
    Oct 25, 2008
    #1
    I am trying to instantiate an UIPickerView like this

    pckVBSView = [[UIPickerView alloc] initWithFrame:CGRectZero];


    unfortunately in this way, the selector view [transparent view in the middle indicating value selected] is not showing up.

    regards
    --ch
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Why would anything show up? You've created a view with zero size...
     
  3. chhoda thread starter macrumors 6502

    Joined:
    Oct 25, 2008
    #3
    I did not say nothing is showing up, I said the selector view does not show up. Obviously I am doing layouting in layoutSubviews function :D

    to elaborate a little, the pickerview is showing, it is scrolling also, but the indicator view which indicates the selected value is not showing up

    --CH
     
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    Quite possibly you need to give it a realistic size to start with.
     

Share This Page