【发布时间】:2016-04-08 18:33:37
【问题描述】:
我正在使用 Swift 和 Xcode 开发我的第一个应用程序。
在我的一个观点中,我有一个分段控件,其中包含表情符号作为显示的文本。 However, I have a problem where whenever one of the emoticons is selected, it becomes blacked out as shown in the image below:
我认为问题与我的分段控件的选定状态的文本属性有关,我的修复尝试是将选定状态的文本属性设置为与正常状态的文本属性相同:
override func viewDidAppear(animated: Bool) {
moodSelector.setTitleTextAttributes(moodSelector.titleTextAttributesForState(.Normal), forState: .Selected)
}
但是,这似乎不起作用。任何帮助将不胜感激?
【问题讨论】:
标签: ios xcode swift cocoa-touch uisegmentedcontrol