         if let _ = fontArr[fontCode] {
             attributedString.replaceCharactersInRange(substringRange, withString: String.getIcon(fontType, code: fontCode)!)
             let newRange = NSRange(location: substringRange.location, length: 1)
-            attributedString.addAttribute(NSFontAttributeName, value: UIFont.iconFontOfSize(fontType, fontSize: fontSize), range: newRange)
+            attributedString.addAttribute(NSFontAttributeName, value: UIFont.iconFont(fontType, ofSize: fontSize), range: newRange)
         }
 
     })


public extension UIBarButtonItem {
    func setFontIcon(font: Fonts, icon: String, fontSize: CGFloat){
        var textAttributes: [String: AnyObject] = [NSFontAttributeName: UIFont.iconFontOfSize(font, fontSize: fontSize)]
        let currentTextAttributes: [String: AnyObject]? = self.titleTextAttributesForState(.Normal)

        if currentTextAttributes != nil {

        let paragraphStyle = NSMutableParagraphStyle()
        paragraphStyle.alignment = NSTextAlignment.Center
        
        drawText!.drawInRect(CGRectMake(0, 0, imageSize.width, imageSize.height), withAttributes: [NSFontAttributeName : UIFont.iconFont(font, ofSize: fontSize)])
        let image = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()

