我有一个 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/