巴依南部 發表於 2023-11-9 11:11:21

iOS overFullScreen与fullScreen区别分析

<div id="navCategory"><h5 class="catalogue">目录</h5><ul class="first_class_ul"><li>overFullScreen与fullScreen区别</li><ul class="second_class_ul"><li>overFullScreen</li><li>fullScreen</li></ul><li>总结</li><ul class="second_class_ul"></ul></ul></div><p class="maodian"></p><h2>overFullScreen与fullScreen区别</h2>
<p class="maodian"></p><h3>overFullScreen</h3>
<blockquote><p>The views beneath the presented content are not removed from the view hierarchy when the presentation finishes. &nbsp;So if the presented view controller does not fill the screen with opaque content, the underlying content shows through.</p></blockquote>
<p>当显示结束时,显示内容下面的视图不会从视图层次结构中删除。因此,如果呈现的视图控制器没有用不透明的内容填充屏幕,底层内容就会显示出来。</p>
<p class="maodian"></p><h3>fullScreen</h3>
<blockquote><p>The views belonging to the presenting view controller are removed after the presentation completes.</p></blockquote>
<p>属于呈现视图控制器的视图在呈现完成后被移除。</p>
<p>详见<code>Xcode-&gt;Window-&gt;Developer Documentation</code>。</p>
<p class="maodian"></p><h2>总结</h2>
<p>如果需要弹出半透明视图使用<code>overFullScreen</code>,但是由于<code>当显示结束时,显示内容下面的视图不会从视图层次结构中删除</code>,所以页面消失时下面的视图不会出发<code>viewWillAppear</code>等方法。</p>
<p>使用fullScreen,在页面消失会触发下面的视图的<code>viewWillAppear</code>等方法,但是<code>呈现视图控制器的视图在呈现完成后被移除</code>实现半透明时透明部分直接黑屏展示。</p>
<p>🐟与熊掌不可兼得😂😂😂。</p>
<p>以上就是iOS overFullScreen与fullScreen区别分析的详细内容,更多关于iOS overFullScreen fullScreen的资料请关注琼殿技术社区其它相关文章!</p>
                           
                            <div class="art_xg">
                              <b>您可能感兴趣的文章:</b><ul><li>iOS关键字static&nbsp;extern&nbsp;const使用示例详解</li><li>iOS报Multiple commands produceMultiple错误的解决方案</li><li>iOS开发输入自动填充UITextField背景色</li><li>iOS小数取整的方法(ceil floor round)示例</li></ul>
                            </div>

                        </div>
                        <!--endmain-->
頁: [1]
查看完整版本: iOS overFullScreen与fullScreen区别分析