क्या यूआईपीकर व्यू का selectRow:inComponent:animated:
कॉल pickerView:didSelectRow:inComponent:
है? अन्यथा, क्या मैं इसे स्वयं ही कह सकता हूं?क्या UIPickerView का चयन करें: इनकंपोनेंट: एनिमेटेड: कॉल पिकर व्यू: didSelectRow: inComponent :?
धन्यवाद
क्या यूआईपीकर व्यू का selectRow:inComponent:animated:
कॉल pickerView:didSelectRow:inComponent:
है? अन्यथा, क्या मैं इसे स्वयं ही कह सकता हूं?क्या UIPickerView का चयन करें: इनकंपोनेंट: एनिमेटेड: कॉल पिकर व्यू: didSelectRow: inComponent :?
धन्यवाद
ऐसा नहीं है, हालांकि इसे मैन्युअल रूप से कॉल करना संभव है।
आपको इसे मैन्युअल रूप से कॉल करना होगा और प्रतिनिधि के बावजूद आप इसे करते हैं।
// In this example the UIPickerView object is in a property
...
self.pickerView.datasource = self;
self.pickerView.delegate = self;
// Selects the row in the specified component
[self.pickerView selectRow:0 inComponent:0 animated:NO];
// Manually calls pickerView:didSelectRow:inComponent:
[self pickerView:self.pickerView didSelectRow:0 inComponent:0];
यह प्रतिनिधि के साथ भी प्रतिनिधि विधि को कॉल नहीं करता है, लेकिन आप इसे मैन्युअल रूप से भी कर सकते हैं। तेज 3 और तेज 4 के लिए निर्णय:
self.pickerView.datasource = self
self.pickerView.delegate = self
self.pickerView.selectRow(0, inComponent: 0, animated: false)
self.pickerView.delegate?.pickerView?(self.pickerView, didSelectRow: 0, inComponent: 0)