Open dron4eeek opened 10 years ago
Thanks for reporting the issue!
So, as far as I can tell, there are two issues here:
So, regarding 1, did you change the expansionResistance
to 0? That might be an issue if you did, otherwise, I am actually able to reproduce the issue, so it is valid.
Regarding 2, I'll take a look.
Yes, i am changing expansionResistance after changing collections (after swiping) like this
- (void)updateScrollViewCollectionsWithType:(enum State)state
{
[self.shyNavBarManager prepareForDisplay];
if (state == State1)
{
self.shyNavBarManager.extensionView = self.searchBar;
self.collectionViewFromChild = leftCollectionViewController.collectionView;
[self.scrollView setContentOffset:CGPointZero animated:YES];
self.shyNavBarManager.scrollView = self.collectionViewFromChild;
[self.shyNavBarManager setViewController:leftCollectionViewController];
self.shyNavBarManager.contractionResistance = 0;
self.shyNavBarManager.expansionResistance = 200;
[rightCollectionViewController.collectionView setContentOffset:CGPointMake(0, valueForScrollUP) animated:NO];
[leftCollectionViewController pullToRefresh];
}
else
{
self.collectionViewFromChild = rightCollectionViewController.collectionView;
[self.scrollView setContentOffset:CGPointMake(self.leftCollectionView.frame.size.width, 0) animated:YES];
self.shyNavBarManager.scrollView = self.collectionViewFromChild;
[self.shyNavBarManager setViewController:rightCollectionViewController];
self.shyNavBarManager.contractionResistance = -self.searchBar.height;
self.shyNavBarManager.expansionResistance = 200 -self.searchBar.height;
[leftCollectionViewController.collectionView setContentOffset:CGPointMake(0, valueForScrollUP) animated:NO];
}
}
Thanks for reply!
I am changing it because on one collectionview I need extensionView on other i dont need it, so second collection y is up to hide extensionView.
I have found some dirty solution by adding childviewcontroller to navigation controller with hidden nav bar and then setting parentviewcontroller like shynavbarmanager and its work)
@dron4eeek You may want to reevaluate setting the resistance to a negative value, I believe this would result in undefined behavior.
I'm glad you found a workaround! I am, however, still investigating the issue to see what could go wrong.
Thank you for this work! Can I bind status bar with shyNavBarManager for hiding status bar when navigation bar hides?
@Mazyod Any update on @Jauzee's question above?
It is really cool component, great gob. I am using it on view controller which is using two collection views in scroll view added like a child view controllers, they are changing by swiping left or right. I set up everything like after scroll page changed i am seting shymanagers scroll and controller :
the same for right.
its working fine on scrolling up, navigation bar hides cool.
The problem is that when I am scrolling down and scroll offset goes under status bar a bit and i begin to scroll down navigation bar begin to appear, but it should appear only when offset y reached the status bar height. Than in expands with out animation. Video: https://www.dropbox.com/s/x024oe0hkydlfyx/bug.mp4 Please help me with this problem. How I can fix it?
Thank you!