ios - UIActivityViewController 的最佳实践

标签 ios objective-c uikit

关于最佳实践,当使用完 UIActivityViewController 时,是否应该将它从使用委托(delegate)模式呈现它的 viewController 中关闭?

当模态呈现其他 ViewController 时,我总是使用委托(delegate)模式来确保父(或呈现)viewController 也进行解散 - 我相信这是最佳实践,所以我想知道这是否适用于此?

最佳答案

来自docs :

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.

所以,回答您的问题,。您应该像对待该 View Controller 一样对待它。

关于ios - UIActivityViewController 的最佳实践,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22167705/

相关文章:

android - 将 API 请求限制为仅我自己的移动应用程序

objective-c - 如何获取特定 UITableViewCell 的节号?

ios - 后台模式下的 AVSpeechSynthesizer

ios - 如何检查设备是 iPad 还是 iPhone 不工作

ios - 如何在 iOS 11 中支持大标签栏预览?

iphone - 带编码的 NSURL

iphone - MFMailComposeViewController 在 iOS5 中 dismissModalViewControllerAnimated 时崩溃

iOS 应用程序 : open a file, 将其发送到网络位置,然后返回调用应用程序

ios - 这个设置委托(delegate)方法是如何工作的?

ios - UITableViewCell accessoryType UITableViewCellAccessoryCheckmark 重复