     
     fileprivate func attributesWithTextColor(_ textColor: UIColor, underlineStyle: NSUnderlineStyle) -> [String: Any] {
         var attributes = attributesWithTextColor(textColor)
-        attributes[NSUnderlineStyleAttributeName] = underlineStyle.rawValue as AnyObject?
+        attributes[NSUnderlineStyleAttributeName] = underlineStyle.rawValue
         
         return attributes
     }

                color = self.highlightedTextColor!
            }
        }
        
        // Paragraph attributes
        let mutableParagraphStyle = NSMutableParagraphStyle()
        mutableParagraphStyle.alignment = self.textAlignment
        
        // LineSpacing
        if let lineSpacing = lineSpacing {
            mutableParagraphStyle.lineSpacing = lineSpacing
        }
        
        // LineHeightMultiple
        if let lineHeightMultiple = lineHeightMultiple {
            mutableParagraphStyle.lineHeightMultiple = lineHeightMultiple
        }
        
        // Attributes dictionary
        var attributes = [NSShadowAttributeName: shadow,
            NSParagraphStyleAttributeName: mutableParagraphStyle] as [String : Any]
        
        if let font = self.font {
            attributes[NSFontAttributeName] = font
        }
        
        if let color = color {
            attributes[NSForegroundColorAttributeName] = color
        }
        
        return attributes as [String : AnyObject]
    }
    
    fileprivate func attributesWithTextColor(_ textColor: UIColor) -> [String: Any] {

            shadow.shadowOffset = CGSize(width: 0, height: -1);
            shadow.shadowColor = nil;
        }

        // Color attributes
        var color = _textColor
        if self.isEnabled == false {
            color = .lightGray
        } else if self.isHighlighted {
