gpt4 book ai didi

uipickerview - UIPickerView 是否选择行 :inComponent:animated: call pickerView:didSelectRow:inComponent:?

转载 作者:行者123 更新时间:2023-12-03 21:17:13 26 4
gpt4 key购买 nike

UIPickerView 的 selectRow:inComponent:animated:调用pickerView:didSelectRow:inComponent: ?
否则,我可以自己打电话吗?

谢谢

最佳答案

您必须手动调用它,并通过委托(delegate)进行。

// 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];

关于uipickerview - UIPickerView 是否选择行 :inComponent:animated: call pickerView:didSelectRow:inComponent:?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7001738/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com