Reputation: 67
I am working on table view cells .On each cell,there is a play button ..on click of that play button audio player plays audio and on double click of that button audio player pauses playing audio. Suppose now when I click button1 on cell1 ,it turns to play on one click and pause on other click.Now its state is pause.
Now ,when I click button2 on cell2 ,it turns to play on click1 and pause on other click.But the state of button1 also stays to pause whereas I want that on click of button2 on cell2 ,it should get back to its original state .i.e the play state.
Kindly help me to achieve this.I am trying to implement it first time.Any help or guidance in this direction would be highly appreciated.Thanks in advance!
Upvotes: 0
Views: 67
Reputation: 1003
Tableview cell needs to reload, better if you have state of button in array, every time you make a button action change state in state array & reload specific row cell; reloadRowsAtIndexPaths
will help you in this regard.
Upvotes: 1