HidingNavigationBar icon indicating copy to clipboard operation
HidingNavigationBar copied to clipboard

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

Open l12ab opened this issue 8 years ago • 11 comments

just as the subject

l12ab avatar May 13 '16 02:05 l12ab

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

img_0306

btc avatar Jan 08 '17 20:01 btc

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

tristanhimmelman avatar Jan 09 '17 00:01 tristanhimmelman

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.

btc avatar Jan 09 '17 03:01 btc

@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

tristanhimmelman avatar Jan 09 '17 15:01 tristanhimmelman

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

btc avatar Jan 09 '17 17:01 btc

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.

LeoNatan avatar Jan 11 '17 20:01 LeoNatan

What is the current status of this problem?

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

StefaniOSApps avatar Jan 14 '19 06:01 StefaniOSApps

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
    }

StefaniOSApps avatar Jan 14 '19 06:01 StefaniOSApps

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

https://github.com/andreamazz/AMScrollingNavbar

l12ab avatar Jan 14 '19 12:01 l12ab

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 avatar Jan 15 '19 09:01 StefaniOSApps

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

Any help is welcome. Many things are already working.

StefaniOSApps avatar Jan 18 '19 18:01 StefaniOSApps