在我的一个应用程序中,我想创建类似于默认联系人应用程序的操作表。我对如何创建这个屏幕有点困惑,它是 iOS 提供的默认操作表还是任何自定义屏幕。如果它是默认操作表,那么如何实现多行操作,因为它在以下屏幕中显示
最佳答案
我认为这是一个带有私有(private) api 的系统操作表。
根据 Apple official document for UIAlertController
The UIAlertController class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.
因为自定义系统操作表是非法的,所以我很确定你不能使用系统操作表来归档这样的东西
您可以通过带有 UIStackView
或 UITableView
的 UIViewController
自行创建。
如果你想要一些库,看看action sheet on Cocoa
关于ios - 创建类似于联系人应用程序的操作表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49936446/