gpt4 book ai didi

ios - 将 UiPickerView 添加到 AlertController

转载 作者:行者123 更新时间:2023-11-28 13:16:32 25 4
gpt4 key购买 nike

我正在尝试使用内置的 UIPickerView 快速创建警报消息。

按下“测试”按钮后,选择器应该出现在警告窗口中: enter image description here

问题仅出在 UIPickerView 的数据源上。它是空的: enter image description here

项目发布在我的GIT repo 。有人可以建议如何解决它吗?非常感谢!

最佳答案

在您的 createContainerView 函数中,将您自己指定为委托(delegate)人,如下所示:

self.currPicker.dataSource = self
self.currPicker.delegate = self

关于ios - 将 UiPickerView 添加到 AlertController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28795313/

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