I am working on my first application using Swift and Xcode.
In one of my views, I have a segmented control which has emoticons as the text being displayed. However, I have a problem where whenever one of the emoticons is selected, it becomes blacked out as shown in the image below:
I think the problem has to do with the text attributes of the selected state of my segmented control, and my attempt at a fix was setting the text attributes of the selected state to be the same as the text attributes of the normal state:
override func viewDidAppear(animated: Bool) {
moodSelector.setTitleTextAttributes(moodSelector.titleTextAttributesForState(.Normal), forState: .Selected)
}
However, this does not seem to work. Any help would be appreciated?