I'm wondering how to make colorful string.
What I mean is:
I will need string to be for example
FirstLetter - white, second - blue, third - red , forth - orange , fifth - white and so on so in loop.
I googled this line of code:
myMutableString.addAttribute(NSForegroundColorAttributeName, value: UIColor.redColor(), range: NSRange(location:2,length:4))
but it gets location and length, but how to make changing color in specified order?