Skip to content

Commit

Permalink
picking safe area from window for consistency (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
naveen-c authored Feb 1, 2021
1 parent 5195078 commit aee644a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ContentSheet/Classes/ContentSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fileprivate enum PanDirection {
//Utility
fileprivate var _safeAreaInsets: UIEdgeInsets {
if #available(iOS 11.0, *) {
return self.view.safeAreaInsets
return UIApplication.shared.keyWindow?.safeAreaInsets ?? self.view.safeAreaInsets
} else {
return UIEdgeInsets.init(top: UIApplication.shared.statusBarFrame.maxY, left: 0, bottom: 0, right: 0)
}
Expand Down

0 comments on commit aee644a

Please sign in to comment.