gpt4 book ai didi

ios - 所有警报对话框消息和文本字段都已更改为单行。请检查图片

转载 作者:可可西里 更新时间:2023-11-01 03:29:50 25 4
gpt4 key购买 nike

以前所有的对话框和文本字段都运行良好。但不是 我不知道这些 TextFields 是如何突然变成单行三重的。 (喜欢这里的一些消息...)

    let alert = UIAlertController(title: "Cancel Booking !!", message: "Are you sure you want to cancel your booking?", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "No", style: .default, handler: nil))
alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: self.cancelMessageDialog))
self.present(alert, animated: true, completion: nil)

Demo 1 Demo 3

最佳答案

我遇到了同样的问题,折腾了三天三夜解决了。由于 UIAlertViewController 使用 UILabel 来显示消息,因此我在整个项目中坚定地搜索修改 UILabel 的内容。我意识到,没有任何搜索结果包含某些 pod 中的任何内容,这些 pod 在其函数名称等中肯定具有“label”关键字。我决定从它们的存储库中下载所有 pod 的源代码,并使用另一个简单的文本编辑器在其中递归搜索,瞧!有些人决定覆盖默认的 UILabel 类,而不是在他们的 pod 中继承它。罪魁祸首是


扩展 UILabel {
...
重写 open func draw(_ rect: CGRect) { ... }
重写 open var intrinsicContentSize: CGSize { ... }
...
}

当我开始搜索 UILabel 扩展时,使用 XCode 中的搜索功能,这些没有显示在搜索结果中。所以,我建议你在你的项目中打开任何 3rd 方框架的源代码,并在其中单独搜索。 UILabel 类肯定有问题。

关于ios - 所有警报对话框消息和文本字段都已更改为单行。请检查图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46212166/

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