           let containerView = ActionSheetItemView(frame: CGRect(
             x: CustomizableActionSheet.kMarginSide,
             y: currentPosition,
-            width: targetBounds.width - (CustomizableActionSheet.kMarginSide * 2),
+            width: safeAreaWidth - (CustomizableActionSheet.kMarginSide * 2),
             height: item.height))
           containerView.layer.cornerRadius = defaultCornerRadius
           containerView.addSubview(view)

        }
      }
    }
    let positionX: CGFloat = 0
    var positionY: CGFloat = targetBounds.minY + targetBounds.height - currentPosition - safeAreaBottom
    var moveY: CGFloat = positionY
    if self.position == .top {

      subview.removeFromSuperview()
    }
    var currentPosition: CGFloat = 0
    let safeAreaLeft: CGFloat
    let safeAreaWidth: CGFloat
    let safeAreaTop: CGFloat
    let safeAreaBottom: CGFloat
    if #available(iOS 11.0, *) {
      safeAreaLeft = targetView.safeAreaInsets.left
      safeAreaWidth = targetView.safeAreaLayoutGuide.layoutFrame.width
      safeAreaTop = targetView.safeAreaInsets.top
      safeAreaBottom = targetView.safeAreaInsets.bottom
    } else {
      safeAreaLeft = 0
      safeAreaWidth = targetBounds.width
      safeAreaTop = CustomizableActionSheet.kMarginTop
      safeAreaBottom = 0
    }
