Skip to content

Commit

Permalink
fixed Scrolling views that don't take up the entire screen Scroll up …
Browse files Browse the repository at this point in the history
…but don't come down #354
  • Loading branch information
Jwolkovitz committed Nov 1, 2018
1 parent eaec83d commit c3144f6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/ScrollingNavbar+Sizes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ extension ScrollingNavigationController {

// 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))
var appHeight = view.bounds.height
var nextView = view
while let superView = nextView?.superview {
appHeight = superView.bounds.height
nextView = superView.superview
}

return abs(appHeight - (UIApplication.shared.delegate?.window??.frame.size.height ?? UIScreen.main.bounds.height))
}

var tabBarOffset: CGFloat {
Expand Down

0 comments on commit c3144f6

Please sign in to comment.