我正在尝试使用内置的 UIPickerView 快速创建警报消息。
按下“测试”按钮后,选择器应该出现在警告窗口中:
问题仅出在 UIPickerView 的数据源上。它是空的:
项目发布在我的GIT repo 。有人可以建议如何解决它吗? 非常感谢!
最佳答案
在您的 createContainerView 函数中,将您自己指定为委托(delegate)人,如下所示:
self.currPicker.dataSource = self
self.currPicker.delegate = self
关于ios - 将 UiPickerView 添加到 AlertController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28795313/