Set the play and pause image for a button iOS swift

Solution:

You had an option that you can set the image for a button in normal and selection mode.


let playImage = UIImage(named: "ic_play_circle_outline_36pt");
 let pauseImage = UIImage(named: "ic_pause_circle_outline_36pt");        audioPlayBtn.setImage(playImage, for: .normal)
  audioPlayBtn.setImage(pauseImage, for: .selected)

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift