Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide NavigationBar when scrolling tableView in CollectionView?

I have collectionViewController and collectionViewCell include TableView.CollectionView is horizontal layout.I want hide navigationbar when scroll the tableView. Is there any idea about that.

like image 987
muhammedkasva Avatar asked Jun 23 '16 09:06

muhammedkasva


1 Answers

You can use some git libraries for scrollable Navigation bar whenever you want to scroll your table view/ Scroll top to bottom / bottom to top it will automatically adjust you Navigation bar.

you can use here like this code for use this library like this

Swift

override func viewWillAppear(animated: Bool) {
    super.viewWillAppear(animated)

    if let navigationController = self.navigationController as? ScrollingNavigationController {
        navigationController.followScrollView(tableView, delay: 50.0)
    }
}

Objective - C

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

    [(ScrollingNavigationController *)self.navigationController followScrollView:self.tableView delay:50.0f];
}

It having some delegate methods help for manage all this related to scroll and navigation.

AMScrollingNavbar click here for see

enter image description here

I think this is helpful for you.

like image 56
Anand Nimje Avatar answered Sep 30 '22 16:09

Anand Nimje