 
 public extension UIFont{
 
-    static func iconFontOfSize(font: Fonts, fontSize: CGFloat) -> UIFont {
+    static func iconFont(font: Fonts, ofSize size: CGFloat) -> UIFont {
         let fontName = font.rawValue
         var token: dispatch_once_t = 0
         if (UIFont.fontNamesForFamilyName(fontName).count == 0) {


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()

