ios - insertRowsAtIndexPaths UITableview issue -


i having table 3 rows right arrow button tag values 0,1,2.while clicking right arrow in first row,it display 2 more rows dropdown.i inserted 2 rows using following code.but how change tag values after insertion of rows 0,1,2,3,4.i have done table reload also.but want show down arrow(previously selected button).so not working.

tableview.insertrowsatindexpaths(indexpaths, withrowanimation: .left) 

this how handled click action of button.

func cellexpandaction(sender: anyobject){      let prod = dataarray[sender.tag]     let indexpath = nsindexpath(forrow: sender.tag, insection: 1)  let selectedcell:othercell = tblmenu.cellforrowatindexpath(indexpath) as! othercell         if(prod.canbeexpanded)         {             if(prod.isexpanded){                 self.collapsecellsfromindexof(prod, indexpath: indexpath, tableview: tblmenu)                 selectedcell.btnarrow.selected = false             }             else{                 selectedcell.btnarrow.selected = true                 self.expandcellsfromindexof(prod, indexpath: indexpath, tableview: tblmenu)             }         }     } 


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -