gpt4 book ai didi

ios - UIActivityViewController 的最佳实践

转载 作者:行者123 更新时间:2023-11-29 10:46:34 32 4
gpt4 key购买 nike

关于最佳实践,当使用完 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/

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