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

Dealing with unusual navbar heights/positioning (e.g. TLYShyNavBar) #251

Open
winzig opened this issue Sep 30, 2015 · 1 comment
Open

Dealing with unusual navbar heights/positioning (e.g. TLYShyNavBar) #251

winzig opened this issue Sep 30, 2015 · 1 comment

Comments

@winzig
Copy link

winzig commented Sep 30, 2015

I've been making small hacks to a fork of TSMessages to make it work better in a project I'm working on. Recently we began using TLYShyNavBar, which offers Facebook/Instagram-like shrinking of the navbar as you scroll.

An issue with that is that my TSMessage alerts were appearing with a gap above them when the navbar had been shrunk, due to scrolling down the page.

After some testing, it appears that TLYShyNavBar doesn't actually shrink the navbar, but instead slides it up and out of view. In other words, instead of the navbar's center.y being at the usual 42, it ends up at -2 when slid out of sight by TLYShyNavBar's behavior.

I added this line to TSMessages right below line 220 of the current TSMessage.m, in the fadeInCurrentNotification method:

verticalOffset += ([currentNavigationController navigationBar].center.y - 42);

This seems to work well, but I'm not well versed in how TSMessages works exactly, so I'm presenting it here as both a "maybe this will help you" and also a "am I doing this right?" kind of thing. :-)

@winzig winzig changed the title Dealing with unusual navbar heights/positioning (e.g. TLYShybar) Dealing with unusual navbar heights/positioning (e.g. TLYShyNavBar) Sep 30, 2015
@Mazyod
Copy link

Mazyod commented Nov 15, 2015

You might want to try the new TLYShyNavBar version. It should resolve most "gap" issues ;) .. Thanks for using it, btw!

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

2 participants