我有一个按钮,想要更改所选图像。 但在改变按钮的图像后。 按钮上显示蓝点。
@IBAction func VideoShowBtn(sender: AnyObject) {
if VideoShowOutlet.selected {
playerVideo.hidden = false
VideoShowOutlet.selected = !VideoShowOutlet.selected
} else {
playerVideo.hidden = true
VideoShowOutlet.selected = !VideoShowOutlet.selected
}
playerVideo.play()
}
但是使用相同的代码。 某些按钮不会显示蓝点。
@IBAction func ShareContentShowBtn(sender: AnyObject) {
if ShareContentShowOutlet.selected {
ShareVideoURLTF.hidden = false
ShareVideoContentTV.hidden = false
ShareContentShowOutlet.selected = !ShareContentShowOutlet.selected
} else {
ShareVideoURLTF.hidden = true
ShareVideoContentTV.hidden = true
ShareContentShowOutlet.selected = !ShareContentShowOutlet.selected
}
}
谁能告诉我为什么以及如何解决这个问题? 谢谢!