ios - UIPickerView pickerView:titleForRow:rowforComponent method not called -
i have uipickerview in storyboard. uiviewcontroller containing has interface declarations set
@interface contactdetail : uiviewcontroller <abpeoplepickernavigationcontrollerdelegate, uipickerviewdatasource, uipickerviewdelegate,uialertviewdelegate, uitextfielddelegate>
on view load, pickerview delegation set
pickerview_relationshiptype.datasource=self; pickerview_relationshiptype.delegate = self; pickerview_relationshiptype.showsselectionindicator = yes;
all uipickerview datasource , delegate methods triggered except 2
pickerview:titleforrow:rowforcomponent , pickerview:viewforrow:forcomponent:reusingview
those next called, no problem
- (nsinteger)pickerview:(uipickerview *)pickerview numberofrowsincomponent:(nsinteger)component - (nsinteger)numberofcomponentsinpickerview:(uipickerview *)pickerview - (void)pickerview:(uipickerview *)pickerview didselectrow: (nsinteger)row incomponent:(nsinteger)component - (cgfloat)pickerview:(uipickerview *)pickerview widthforcomponent:(nsinteger)component
what's in numberofcomponentsinpickerview
?
if numberofrows
returning 0, delegate method never called - picker won't inquire title of row if doesn't think has rows display.
ios objective-c uipickerview uipickerviewdatasource uipickerviewdelegate
No comments:
Post a Comment