title: How to change a button image after selecting a row from table view - iOS
body: <p>I am new to Xcode and iOS development and trying to build an app which plays few <em>mp3</em> files. The corresponding file is played when a row in a <code>tableview</code> is selected. I have created a play button (custom button) with <code>PlayButton</code> Icon. What I am trying to do here is:</p>
  
  <ol>
  <li>When I select a row, the song plays and then the image should change from Play to Pause</li>
  <li>So far I have been able to program the Play button such that if the song is playing the button image toggles to Pause/Play. </li>
  </ol>
  
  <p>What I need help with is:</p>
  
  <ol>
  <li>How do I access the custom button from <code>didSelectRowAtIndexPath</code></li>
  <li>How to change the image to a different image.</li>
  </ol>
  
  <p>Any help will be greatly helpful. </p>