                 if (isNavBarHidden && !isStatusBarHidden) { offsetY += statusBarHeight }
             } else {
                 y += margin.top
+                
+                if isInsideSafeAreaInsets, #available(iOS 11.0, *) {
+                    y += inView.safeAreaInsets.top
+                }
             }
             
         case .bottom:

    public private(set) var textAlignment: GSMessageTextAlignment = .center
    public private(set) var textColor: UIColor = .white
    public private(set) var textNumberOfLines: Int = 1
    
    public var messageWidth:  CGFloat {
        return inView.frame.width - margin.horizontal

            case let .textAlignment(value): textAlignment = value
            case let .textColor(value): textColor = value
            case let .textNumberOfLines(value): textNumberOfLines = value
            case let .isInsideSafeAreaInsets(value): isInsideSafeAreaInsets = value
            }
        }
        
