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

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift