How do you add a background color around each variable inside the interests variable? Just around text not the spaces.
var interests = \"\\(int01) \\(int02)
let attributedString = NSMutableAttributedString(string: interests) attributedString.addAttribute(NSBackgroundColorAttributeName, value: yourColor, range: NSMakeRange(startOfWord, lengthOfWord))