gpt4 book ai didi

ios - 类似于 iOS 7 Safari 的类似 UIActionSheet 的控件

转载 作者:行者123 更新时间:2023-11-28 18:20:55 24 4
gpt4 key购买 nike

我正在尝试创建一个类似于 Safari 的 UIActionSheet。我无法在 Apple 文档中找到任何有关如何使 UIActionSheet 看起来像这样的内容。是否缺少我可以用来创建下面内容的控件/API,或者我是否坚持创建自己的 UIView 并显示它?

Ninja Edit:这似乎是一个 UIActivityViewController。有什么方法可以向其中添加我自己的自定义操作吗?

ios 7 UIActionSheet

最佳答案

那不是 UIActionSheet。

它是一个 UIActivityViewController:

https://developer.apple.com/library/ios/documentation/uikit/reference/UIActivityViewController_Class/Reference/Reference.html

来自 Apple 的文档:

The UIActivityViewController class is a standard view controller that you can use to offer
various services from your application. The system provides several standard services,
such as copying items to the pasteboard, posting content to social media sites, sending
items via email or SMS, and more. Apps can also define custom services.

Your app is responsible for configuring, presenting, and dismissing this view controller.
Configuration for the view controller involves specifying the data objects on which the
view controller should act. (You can also specify the list of custom services your app
supports.) When presenting the view controller, you must do so using the appropriate means
for the current device. On iPad, you must present the view controller in a popover. On
iPhone and iPod touch, you must present it modally.

关于ios - 类似于 iOS 7 Safari 的类似 UIActionSheet 的控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20894515/

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