gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:36:12 26 4
gpt4 key购买 nike

我有一个 UIViewController 对象,里面有一个 UITableView 对象。我想在下拉 UITableViewCell 时隐藏 UINavigationbar,在上拉 UITableViewCell 时显示 UINavigationbar。我应该怎么办?谢谢。

最佳答案

感谢 dimimpou 和 Wain。现在我像这样使用你的想法:

- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
{
if (velocity.y > 0)
{
[self.navigationController setNavigationBarHidden:YES animated:YES];
}
else
{
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
}

关于ios - 如何在 ios 中下拉 TableView 时隐藏 UINavigationbar?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22008298/

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