         containerView.layer.zPosition = 1
         containerView.addSubview(messageView)
 
-        messageText.text = text
-        messageText.font = GSMessage.font
-        messageText.textColor = textColor
+        messageText.attributedText = attributedText
         messageText.numberOfLines = textNumberOfLines
         messageText.textAlignment = textAlignment.nsTextAlignment
         messageView.addSubview(messageText)

        updateFrames()

        if animation == .fade {
            messageView.alpha = 0
            UIView.animate(withDuration: animationDuration, animations: { self.messageView.alpha = 1 }) 
        }

        else if animation == .slide && position == .top {
            messageView.transform = CGAffineTransform(translationX: 0, y: -messageHeight + -margin.top)
            UIView.animate(withDuration: animationDuration, animations: { self.messageView.transform = CGAffineTransform(translationX: 0, y: 0) }) 
        }

        else if animation == .slide && position == .bottom {
            messageView.transform = CGAffineTransform(translationX: 0, y: height + margin.bottom)
            UIView.animate(withDuration: animationDuration, animations: { self.messageView.transform = CGAffineTransform(translationX: 0, y: 0) }) 
        }

        if autoHide { GS_GCDAfter(autoHideDelay) { self.hide(animated: true) } }

    }

    public func hide(animated: Bool) {

        if inView?.installedMessage !== self || inView?.uninstallMessage != nil { return }

        inView?.uninstallMessage = self
        inView?.installedMessage = nil

public class GSMessage: NSObject {

    public static var font : UIFont = UIFont.systemFont(ofSize: 14)
    
    public static var successBackgroundColor : UIColor = UIColor(red: 142.0/255, green: 183.0/255, blue: 64.0/255,  alpha: 0.95)
    public static var warningBackgroundColor : UIColor = UIColor(red: 230.0/255, green: 189.0/255, blue: 1.0/255,   alpha: 0.95)
    public static var errorBackgroundColor   : UIColor = UIColor(red: 219.0/255, green: 36.0/255,  blue: 27.0/255,  alpha: 0.70)
    public static var infoBackgroundColor    : UIColor = UIColor(red: 44.0/255,  green: 187.0/255, blue: 255.0/255, alpha: 0.90)
    
    public class func showMessageAddedTo(text: String,
                                         type: GSMessageType,
                                         options: [GSMessageOption]?,
                                         inView: UIView,
                                         inViewController: UIViewController?) {
        
        let attributedText = NSAttributedString(
            string: text,
            attributes: [
                .font: GSMessage.font,
                .foregroundColor: UIColor.white,
                .paragraphStyle: NSParagraphStyle()
            ]
        )
        
        showMessageAddedTo(attributedText: attributedText, type: type, options: options, inView: inView, inViewController: inViewController)
    }

    public class func showMessageAddedTo(attributedText: NSAttributedString,
                                         type: GSMessageType,
                                         options: [GSMessageOption]?,
                                         inView: UIView,
                                         inViewController: UIViewController?) {
        
        if inView.installedMessage != nil && inView.uninstallMessage == nil {
            inView.hideMessage()
        }
        
        if inView.installedMessage == nil {
            GSMessage(attributedText: attributedText,
                      type: type,
                      options: options,
                      inView: inView,
                      inViewController: inViewController).show()
        }
    }

    public func show() {

        guard inView?.installedMessage == nil else {
            return
        }

        inView?.installedMessage = self
        inView?.addSubview(containerView)
