0
배열에 설정된 항목을 선택할 수있는 uipickerview가 있지만 선택한 옵션으로 uilabel의 텍스트를 설정하는 방법을 고민 중입니다. 여기 UIPickerView가 선택되었습니다.
내가 uipicker 위임 및 데이터 소스를 생성하기 위해 사용하고있는 코드입니다 :-(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component {
return [treatments count];
}
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
return 1;
}
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
{
return[[treatments objectAtIndex:row]valueForKey:@"treatmentName"];
}
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
}
내가 아는 건은 사전
에 uipicker의 didselectrow 기능에감사를 수행해야한다는 것이다 아래의 방법
감사합니다 암탉 난 할 수있어 – Ollie
괜찮아요 그리고 당신은 가장 환영합니다 – Pratik