내 스토리 보드에 UIPickerView가 있습니다. 의 UIViewController는 인터페이스 선언 뷰로드에UIPickerView pickerView : titleForRow : rowforComponent 메서드가 호출되지 않았습니다.
@interface ContactDetail : UIViewController <ABPeoplePickerNavigationControllerDelegate, UIPickerViewDataSource, UIPickerViewDelegate,UIAlertViewDelegate, UITextFieldDelegate>
를 설정했습니다 포함, pickerview 대표단은
pickerView_RelationshipType.dataSource=self;
pickerView_RelationshipType.delegate = self;
pickerView_RelationshipType.showsSelectionIndicator = YES;
모든 UIPickerView 데이터 소스 및 위임 방법
그 다음 그 2pickerView:titleForRow:rowforComponent
and
pickerView:viewForRow:forComponent:reusingView
제외하고 트리거 설정 문제 없다면
- (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
iBhavin 및 JAL 모두에게 감사드립니다. 나는 내 dataSource가 coreData에서 nil을 반환하고 있다는 것을 깨달았다. 문제가 – Add080bbA
으로 해결되면 내 대답에 동의 한 것으로 표시해주세요. – JAL