Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully Hide Follower(s) and content inset issues #335

Open
StainlessStlRat opened this issue Oct 14, 2018 · 35 comments
Open

Fully Hide Follower(s) and content inset issues #335

StainlessStlRat opened this issue Oct 14, 2018 · 35 comments

Comments

@StainlessStlRat
Copy link

StainlessStlRat commented Oct 14, 2018

Describe the bug
I am replacing TLYShyNavBarManager with your library and liking it very much! However, I'm not sure I understand how to to use it correctly.

I have a UIViewController that has a full screen tableView.
I create a custom toolbar programmatically and add it as a subview to self.view (I suspect herein lies my content inset issue. With TLY, I didn't have to add it to self.view)

Everything works GREAT except:

  1. The toolbar I have set as a follower does not fully hide. I can actually live with this until a future update.
  2. The toolbar covers up some of the underlying tableview. This I have to fix ASAP.

Relevant code:

//Creating of toolbar
_statusBar = [[StatusBar alloc] initWithFrame:CGRectMake(0.0, 0.0, self.view.frame.size.width, 130.0)];
_statusBar.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
_statusBar.searchBar.delegate = self; //Implement search bar delegate features
[self.view addSubview:_statusBar];

//Attaching/Following
NavigationBarFollower *statusBarFollow = [[NavigationBarFollower alloc] initWithView:_statusBar direction:NavigationBarFollowerCollapseDirectionScrollUp];
[(ScrollingNavigationController *)self.navigationController followScrollView:_tableView delay:0 scrollSpeedFactor:1 collapseDirection:NavigationBarCollapseDirectionScrollDown followers:@[statusBarFollow]];

Here is a video demonstrating my issue!
https://imgur.com/a/hWmjgrf

In the video, my "toolbar" is the thing from the bottom of the nav bar all the way to the "games shown" stuff

Any help would be greatly appreciated! And thanks for the library!

@StefaniOSApps
Copy link

Do not use

if (@available(iOS 11.0, *)) {
          [table setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
}

@StainlessStlRat
Copy link
Author

Thanks Stefani, I already checked and I am not using that (though that was being called in the old TLYShyNav lib)

@StainlessStlRat
Copy link
Author

StainlessStlRat commented Oct 14, 2018

I updated my project to create the "toolbar" in storyboard (instead of programmatically) with constraints set to have the top of the tableview to be constrained to the bottom of my toolbar.

It makes it so the tableview isn't covered up, but now when scrolling up their is an empty space.

Here is a video
https://imgur.com/a/fnF2GsU

@StefaniOSApps
Copy link

the best way is to make a sample project and upload it on GitHub. Yes, this framework has some issues, including the gaps. I have now noticed a new issue, then I will post with a demo project.

@StainlessStlRat
Copy link
Author

I will gladly create a demo project if it is helpful. Just want to make sure I’m not doing something wrong.

@StefaniOSApps
Copy link

That will be the best. You can also test my creation of the framework. There are some errors already fixed. Also make sure you have set translucens to true.

@StainlessStlRat
Copy link
Author

I ran your demo last night. For whatever reason for me the performance was very bad, even in release mode. Ill try again tonight.

@StefaniOSApps
Copy link

In the Demo Projet I have outsourced the framework from cocoapod. Only so could see in messages of the terminal.

https://github.com/StefaniOSApps/Example

or use

pod 'AMScrollingNavbar',
  :git => 'https://github.com/StefaniOSApps/AMScrollingNavbar.git'#,
  #:branch => 'master'

@StainlessStlRat
Copy link
Author

https://github.com/StainlessStlRat/ScrollBarDemo

It doesn't behave precisely like my app does during integration, but close enough to demonstrate the issue with the gap and not hiding the follower.

Please let me know if there is anything else I can do to help.

@StefaniOSApps
Copy link

the content inset can you see here:
bildschirmfoto 2018-10-19 um 21 57 44

I think the hight of UITableView is fix.

@StainlessStlRat
Copy link
Author

How can I go about fixing that? Shouldn’t it be an offset/inset that is passed in by the scroll manager?

Also what about the follower not hiding?

@StainlessStlRat
Copy link
Author

And how do you look at the interface that way? :)

@StainlessStlRat
Copy link
Author

Here is an example of the functionality I need to replace (old version of my app integrated with TLYShyNavBar)
https://imgur.com/a/UTs1HGf

You can see the follower hides first, then the nav bar.

@StefaniOSApps
Copy link

@StainlessStlRat
Copy link
Author

Hello, just checking in again.

If the author gets a chance, can you let me know whether or not this is a bug or if it’s just something that the library wasn’t designed for etc...

I can understand if you don’t have time to fix it, but just understanding whether or not it is truly a bug would be helpful.

@andreamazz
Copy link
Owner

Let me check

@andreamazz
Copy link
Owner

andreamazz commented Nov 28, 2018

Ok, I'm reading back the issue, in the end your request is, if I understand corectly, how to implement this behaviour: https://imgur.com/a/UTs1HGf

The followers feature works the other way around, they follow the navbar while it's scrolling away, but they remain on screen at all times.
On top of my head I think you can recreate that effect by serving the header view inside the cell at indexpath 0,0, and use the scroll delay feature to account for its height.

@andreamazz
Copy link
Owner

Here, like this:
ScrollBarDemo.zip

@StainlessStlRat
Copy link
Author

Hey thank you andremazz!! I will look at your demo and look at replacing the one I use with yours again. I realllllllly hope I can get it working because the library I'm using is no longer in development.

@StainlessStlRat
Copy link
Author

Hello andreamazz, I checked out your demo but unfortunately it's not quite what I'm after. If you look closely at the Imgur gif, the toolbar underneath the navbar can be visible at any index. So you could be at cell 500 for example, pull down a little and the toolbar will still pop up.

If you have a moment, maybe you can download my app @ https://itunes.apple.com/us/app/gameye/id1105342771?mt=8
and see how it currently works to see if it's possible to implement with your library?

Just open the app, click on games, and go to the encyclopedia tab and scroll around. I would absolutely LOVE to replace it's implementation with yours, and if this functionality isn't currently in the library, I think your users would find it quite useful!

@andreamazz
Copy link
Owner

Ok, I see what you mean, let me think about it.
Btw, the scrolling sometimes is janky on an iPhone XS, it feels like the app is calling networking code on the main thread. Out of curiosity, what are you using to download images?

@StainlessStlRat
Copy link
Author

It's probably installing first time use data and unzipping it or something. I bet it's smooth now :) For the image streaming I'm using sd stream I think it's called?

@StainlessStlRat
Copy link
Author

So I finally figured out that the library I have been using is occasionally crashing via OOM, which Crashylytics doesn't catch. Hopefully you figure something out!

@andreamazz
Copy link
Owner

Yep, I'm working on this feature. It's not straightforward to implement, it might take a while.

@StainlessStlRat
Copy link
Author

That’s great news!!!! I was able to patch the oom, but it’s hack on hack on hack so I cant wait for your version!

@andreamazz
Copy link
Owner

Hey @StainlessStlRat
I'm still working on it, it's taking longer than I thought :)

@StainlessStlRat
Copy link
Author

I’m glad youre working on it!!

@StainlessStlRat
Copy link
Author

How's it coming along? Any progress?

@andreamazz
Copy link
Owner

I'm a bit swamped between work and moving from my old apartment. I can push the current state on a separate branch, any help is welcome.

@andreamazz
Copy link
Owner

Checkout branch header

@X901
Copy link

X901 commented Apr 8, 2019

Any update ?
I faced same issue

https://cl.ly/f272f705d050

@StainlessStlRat
Copy link
Author

Any progress? I don't mind looking at the branch, but is there certain issues you're facing?

@StainlessStlRat
Copy link
Author

Any updates?

@StainlessStlRat
Copy link
Author

Just checking in to see if there’s any progress?

@andreamazz
Copy link
Owner

Hey @StainlessStlRat
sorry for the delay, I'm currently unable to work on this. There is a partial implementation in the header branch, any help is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants