how to handle toogle button on every and each on tableviewcell in iPhone

前端 未结 2 1243
小鲜肉
小鲜肉 2021-01-26 13:35

My code is working fine but it works only for a single cell. When i define 5 rows then it works only for the last cell. If I click on 1 cell then value displayimage

2条回答
  •  灰色年华
    2021-01-26 13:53

    Take an Array, Store the selected buttons tag in the array and while displaying the button in the cellForRowAtIndex method. check out whether the buttons tag is in that array or not. If its there then show your selected button image else unselected buttons image.

提交回复
热议问题