菜鸟教程小白 发表于 2022-12-11 18:29:25

ios - UIActivityController 没有全屏显示


                                            <p><p>我正在展示 UIActivityController 但它在屏幕上显示一半。 <a href="/image/b5MWp.png%60" rel="noreferrer noopener nofollow"><img src="/image/b5MWp.png%60" alt="enter image description here"/></a> </p>

<pre><code> let textToShare = &#34;This is awesome!Check out this website about it!&#34;
    if let myWebsite = NSURL(string:urlShare) {
      let objectsToShare =
      let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
      //New Excluded Activities Code
      activityVC.excludedActivityTypes =

      self.navigationController!.presentViewController(activityVC, animated: true, completion: nil)
</code></pre></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>您是否尝试在当前 <code>ViewController</code> 上而不是 <code>self.navigationController</code> 上 <code>self.presentViewController</code>。 </p>

<p>我曾经遇到过这个问题,因为我的 <code>rootViewController</code> 较大,因此在使用 <code>self.navigationController</code> 进行演示时,它会被切断。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - UIActivityController 没有全屏显示,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/41458440/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/41458440/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - UIActivityController 没有全屏显示