选择日期时如何隐藏选择器?
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
countryCodeString = [NSString stringWithFormat:@"+%@",[array_countryCode objectAtIndex:row]];
[countryCodeButton setTitle:countryCodeString forState:UIControlStateNormal];
}
我得到了我的解决方案
- - - - - - (void) textFieldDidEndEditing: *) (UITextField textField {
[picker removeFromSupperView];
}
我们可以像下面这样隐藏pickerview的组件选择…
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
countryCodeString = [NSString stringWithFormat:@"+%@",[array_countryCode objectAtIndex:row]];
[countryCodeButton setTitle:countryCodeString forState: uicontrolstatnormal];
[picker removeFromSupperView];}