         
         contentView.addSubview(outerStackView)
         outerStackView.snp.makeConstraints { (make) in
-            make.left.equalToSuperview().offset(padding)
-            make.bottom.equalToSuperview().offset(-bottomSpacing)
-            make.right.equalToSuperview().offset(-padding)
+            if #available(iOS 11.0, *) {
+                make.left.equalTo(safeAreaLayoutGuide).offset(padding)
+                make.right.equalTo(safeAreaLayoutGuide).offset(-padding)
+            } else {
+                make.left.equalToSuperview().offset(padding)
+                make.right.equalToSuperview().offset(-padding)
+            }
+
+            make.bottom.equalToSuperview().offset(-verticalSpacing)
         }
     }
     

    /// The view that is presented on the right side of the notification
    private var rightView: UIView?
    
    private let iconSize: CGFloat = 24.0
    
    public init(title: String,

                rightView: UIView? = nil,
                style: BannerStyle = .info,
                colors: BannerColorsProtocol? = nil,
                iconPosition: IconPosition = .center) {
        
        self.leftView = leftView
        self.rightView = rightView
