button - Change Selected Image Bug In Swift -


i have button , want change selected image. after change image of button. there show blue point on button.

after selected

before selected

@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() } 

but same code. button won't shows blue point.

@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     }  } 

can tell me why , how fix it? thanks!

fastest way solve it: set tintcolor clearcolor, on storyboard: enter image description here

or programmatically:

videoshowoutlet.tintcolor = uicolor.clearcolor() 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -