Just like with Apples timer app, you can t select "0". You have to choose at least 1 hour or 1 minute. Here is how I m formatting the textfield for the picker..
//Formats the textfield based on the pickers.
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
NSString *result = [feetArray objectAtIndex:[feetPicker selectedRowInComponent:0]];
result = [result stringByAppendingFormat:@"%@ft", [feetArray objectAtIndex:[feetPicker selectedRowInComponent:1]]];
result = [result stringByAppendingFormat:@" %@", [inchArray objectAtIndex:[inchesPicker selectedRowInComponent:0]]];
result = [result stringByAppendingFormat:@"%@", [inchArray objectAtIndex:[inchesPicker selectedRowInComponent:1]]];
result = [result stringByAppendingFormat:@" %@in", [fractionArray objectAtIndex:[fractionPicker selectedRowInComponent:0]]];
RiseTextField.text = result;
}
如果他们选择“0”一切方式,我就希望脚步自动走到1位。 我认为,我有3名仲裁员。 2个元件,2个 in组件,1个零件。 因此,它在10f 09 1/16in等文本领域表现出来。