且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将图像添加到UIAlertController

更新时间:2023-12-06 16:28:16

不幸的是,Apple不允许我们将图像添加到UIAlertControllerUIAlertView.这些API仅限于Apple的人机界面指南.

Unfortunately Apple does not allow us to add images to UIAlertController or UIAlertView. These APIs are limited to Apple's Human Interface Guidelines.

如果您确实需要类似UIAlertController的对话框中的图像,我建议您尝试使用类似

If you really need an image in a UIAlertController-like dialog, I would recommend trying to use something like https://github.com/wimagguc/ios-custom-alertview.