AMScrollingNavbar icon indicating copy to clipboard operation
AMScrollingNavbar copied to clipboard

ios11 issue

Open mervekeles opened this issue 6 years ago • 10 comments

Hi,

I am using paging menu with a UIScrollView and the AMScrollingNavbar works fine with ios 10. But on iOS 11 I couldnt hide the nav bar with scroll. Anyone had the same issue?

THANKS!

mervekeles avatar Oct 26 '17 14:10 mervekeles

Hi @mervekeles Can you provide more detail? A sample project showing the issue would be great too. Thanks

andreamazz avatar Nov 02 '17 10:11 andreamazz

Hi @mervekeles We also facing same issue.

Please find attached Screenshots for iOS 10 & iOS 11 diff.

ios 11 ios-10

toseefkhilji avatar Dec 23 '17 18:12 toseefkhilji

Hi.

We have the same issue.

Here is what I have find out. Above mentioned bug doesn't appear in frameworks version 3.4.1 but it does on latest version. The problem with version 3.4.1 is iPhone X nav bar height issue.

Also it is important to note that the latest version bug doesn't appear in new build projects. It seems that framework get conflict with other used frameworks.

Hear is the list of frameworks used in our app.

Cartfile github "realm/realm-cocoa" github "Instagram/IGListKit" ~> 2.0.0 github "Hearst-DD/ObjectMapper" ~> 2.2 github "SwiftyBeaver/SwiftyBeaver" github "Moya/Moya" ~> 8.0.0 github "andreamazz/AMScrollingNavbar" == 3.4.1 github "onevcat/Kingfisher" ~> 3.0 github "malcommac/SwiftDate" ~> 4.1.1 github "BranchMetrics/iOS-Deferred-Deep-Linking-SDK" github "aws/aws-sdk-ios"

Podfile pod 'RMQClient', '~> 0.10.0' pod 'Shimmer' pod "CleverTap-iOS-SDK" pod 'FBSDKShareKit' pod "Texture", '= 2.2' pod 'ActiveLabel' pod 'GPUImage'

Latest version bug. navbar bug

3.4.1 version bug. 3 4 1 initial_state 3 4 1

Movsisyan avatar Jan 24 '18 11:01 Movsisyan

Thank you @Movsisyan for these details. So, to recap: Happens on versions greater then 3.4.1, and only if coupled with those libraries? @toseefkhilji do you see a library that you include as well?

andreamazz avatar Jan 24 '18 11:01 andreamazz

Except latest version I have tried only on 3.4.1.

And yes it happens when coupled with those libraries.

Movsisyan avatar Jan 24 '18 11:01 Movsisyan

Hello. I have faced the same issue on my app, but only in some conditions (I'm using a TabBarController so each of my VCs has its own scrolling navigation controller). One of them that I was able to pinpoint, is when ios 11 Large Titles are enabled, the title does not fade out (but moves upwards) and stays, as in the screenshots provided by @toseefkhilji

Screenshot: https://imgur.com/a/kbVO0EH

This only happens in my app when the previous VC has Large Titles enabled.

lpbas avatar May 21 '18 09:05 lpbas

This problem is not because of framework conflicts. This happens when your navigation controller view is not the exact same size as your application window. For instance your navigation controller could be smaller because you have a static tab bar beneath it. The problem arises because of the following code:

// Extended status call changes the bounds of the presented view
var extendedStatusBarDifference: CGFloat {
  return abs(view.bounds.height - (UIApplication.shared.delegate?.window??.frame.size.height ?? UIScreen.main.bounds.height))
}

When the in call status bar is not visible this should always return 0 and when it is visible it should return 20. In this case, when the call status bar is not visible we are getting some high positive number because the navigation controller view is not the exact same size as the application window. The solution is to replace the code with the following:

// Extended status call changes the bounds of the presented view
var extendedStatusBarDifference: CGFloat {
  let window = UIApplication.shared.delegate?.window
  return abs((window??.rootViewController?.view.frame.size.height ?? UIScreen.main.bounds.height) - (window??.frame.size.height ?? UIScreen.main.bounds.height))
}

This uses the rootViewController to check for the difference instead.

Note: The above gif example has a tab bar present.

joshbernfeld avatar Jul 25 '18 23:07 joshbernfeld

@L4grange were you able to test what @joshbernfeld suggested?

andreamazz avatar Jul 26 '18 15:07 andreamazz

@andreamazz Unfortunatelly in my app the suggestion that @joshbernfeld posted did not fix the issue. The title is still visible. If I disable the Large titles on the previous VC, then the problem disappears.

lpbas avatar Jul 26 '18 15:07 lpbas

Im guessing this still causes problems for large titles, you might want to try returning zero from extendedStatusBarDifference to see if that fixes it.

joshbernfeld avatar Jul 28 '18 21:07 joshbernfeld