                             self.removeAttribute(NSFontAttributeName, range: range)
                             self.addAttribute(NSFontAttributeName, value: newFont, range: range)
                             self.endEditing()
-        } as! (Any?, NSRange, UnsafeMutablePointer<ObjCBool>) -> Void)
+        })
     }
 }

        enumerateAttribute(NSFontAttributeName,
                           in: range,
                           options: [],
                           using: { (object: AnyObject?, range: NSRange, stop: UnsafeMutablePointer<ObjCBool>) in
                            guard let font = object as? UIFont else {
                                return
                            }

                                spansRange = false
                                stop.pointee = true
                            }
        })

        return spansRange
    }
