Try the following:
let attributes = [
NSFontAttributeName: UIFont(name: "Georgia", size: 15.0)!,
NSForegroundColorAttributeName: UIColor.orangeColor(),
NSStrikethroughStyleAttributeName: NSNumber(integer: NSUnderlineStyle.StyleSingle.rawValue)
]
let myTitle = NSAttributedString(string: Xdevices[row].deviceName!, attributes: attributes)
NSAttributedString(string:attributes:)expects a type dictionary [String: AnyObject]. However, m StyleSingleis Int. Therefore, you must wrap it inside NSNumber.
source
share