picker의 스크롤로 값선택여부 및 선택된 값 자동감지

#pragma mark -

#pragma mark UIPickerViewDelegate


- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component

{

if (pickerView == myPickerView)// don't show selection for the custom picker

{

// report the selection to the UI label

label.text = [NSStringstringWithFormat:@"%@ - %d",

[pickerViewArrayobjectAtIndex:[pickerView selectedRowInComponent:0]],

[pickerView selectedRowInComponent:1]];

}

}




출처 : http://blog.naver.com/PostList.nhn?blogId=philipousys¤tPage=12
Posted by 오늘마감

티스토리 툴바