菜鸟教程小白 发表于 2022-12-12 19:24:26

ios - 当我在ios中下拉TableView时如何隐藏UINavigationbar?


                                            <p><p>我有一个 UIViewController 对象,里面有一个 UITableView 对象。我想在下拉 UITableViewCell 时隐藏 UINavigationbar,并在上拉 UITableViewCell 时显示 UINavigationbar。我应该怎么办?谢谢。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>感谢 dimimpou 和 Wain。
现在我像这样使用你的想法:</p>

<pre><code>- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
{
    if (velocity.y &gt; 0)
    {
      ;
    }
    else
    {
      ;
    }
}
</code></pre></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 当我在ios中下拉TableView时如何隐藏UINavigationbar?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/22008298/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/22008298/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 当我在ios中下拉TableView时如何隐藏UINavigationbar?