                 }
             } else {
                 y -= margin.bottom
+                
+                if isInsideSafeAreaInsets, #available(iOS 11.0, *) {
+                    y -= inView.safeAreaInsets.bottom
+                }
             }
         }
     }

    case textAlignment(GSMessageTextAlignment)
    case textColor(UIColor)
    case textNumberOfLines(Int)
}

extension UIViewController {

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