3
目前在我的应用程序中,如果我从后端获取空值,我需要在DatePicker
中显示N/A。有没有在UIDatePicker
中显示N/A的选项?UIDatePicker与N/A选项
目前在我的应用程序中,如果我从后端获取空值,我需要在DatePicker
中显示N/A。有没有在UIDatePicker
中显示N/A的选项?UIDatePicker与N/A选项
如果从服务器收到您的空闲数据在
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view
方法添加一个对象。
不,没有办法显示“N/A”与UIDatePicker
。
UIDatePicker
不是UIPickerView
的子类。
您可以
UIDatePicker
UIDatePicker
用于当没有数据单 “N/A” 排UIPickerView
。UIDatePicker
代替按钮“没有日期设置:点击添加日期”,弹出一个UIAlertController
,其中嵌入了UIDatePicker
。添加“设置日期”或“取消”选项以恢复到未设置状态。
他问'UIDatePicker'不是'UIPicker' – 2013-02-25 07:15:08
是的,我明白。我的意图是,如果他/她从空的服务器收到数据,只需在UIPIckerView的UIDatePicker View中显示N/A。 – Madhu 2013-02-25 07:18:57