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

display more 20px (statusbar height) when calling or some devices connecting to personal hotspot #32

Open
l12ab opened this issue May 13, 2016 · 11 comments

Comments

@l12ab
Copy link

l12ab commented May 13, 2016

just as the subject

@btc
Copy link

btc commented Jan 8, 2017

To elaborate. The navigation bar juts out into the screen when the status bar is expanded.

img_0306

@tristanhimmelman
Copy link
Owner

If anybody has time to add this functionality I would happily accept a PR to support this. I currently do not have time to work on this

@btc
Copy link

btc commented Jan 9, 2017

Unless I am misunderstanding the original post on this issue, I wouldn't consider this issue a request for additional functionality. The issue I am reporting is a bug.

Do you know what's causing the issue? If you can point me in the right direction, perhaps I could take a shot at it.

@tristanhimmelman
Copy link
Owner

@btc this feature was never actually supported by the library which is why I don't call it a bug.

I believe the root of the issue is that the ViewController changes its frame and HidingNavigationBarManager does not respond to this event. I would start in that class by monitoring the following events:

  • UIApplicationWillChangeStatusBarFrameNotification
  • UIApplicationDidChangeStatusBarFrameNotification

@btc
Copy link

btc commented Jan 9, 2017

Thank you. I'll have a look at this and give it a shot.

@LeoNatan
Copy link

LeoNatan commented Jan 11, 2017

In addition to status bar frame changes, the framework should also consider when the status bar becomes hidden and shown. The same notifications are thrown for showing / hiding the status bar, so it is possible to add all handling there.

@StefaniOSApps
Copy link

What is the current status of this problem?

simulator screen shot - iphone 5s - 2019-01-14 at 05 53 22

@StefaniOSApps
Copy link

Solution founded ! .. plz create a PullRequest

fileprivate func statusBarHeight() -> CGFloat {
        if UIApplication.shared.isStatusBarHidden {
            return 0
        }
        
        let statusBarSize = UIApplication.shared.statusBarFrame.size
        let extendedStatusBarDifference = abs(viewController.view.bounds.height - (UIApplication.shared.delegate?.window??.frame.size.height ?? UIScreen.main.bounds.height))
        
        return min(statusBarSize.width, statusBarSize.height) - extendedStatusBarDifference
    }

@l12ab
Copy link
Author

l12ab commented Jan 14, 2019

I use another library since I submitted this issue and didnt get response.

https://github.com/andreamazz/AMScrollingNavbar

@StefaniOSApps
Copy link

Yes, I know this framework. I create my own at https://github.com/StefaniOSApps/AMScrollingNavbar - but it sucks - it use only tap gesture and too many bugs. I hope i can fix the other bugs at this framework. The current bug was fixed.

@StefaniOSApps
Copy link

I want to upgrade this Framework to iOS 11.
https://github.com/StefaniOSApps/TLYShyNavBar

Any help is welcome. Many things are already working.

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

No branches or pull requests

5 participants