swift - Update label in custom UITableView Cell -


i need update label clicking on button in same cell. why code doesn't work ?

@ibaction func actionfaveunfave(sender: anyobject) {     let cell = self.tableview.cellforrowatindexpath(sender.indexpath)     println(cell?.labelfavedtimes)     cell.labelfavedtimes = "22"} 

cell?.labelfavedtimes.text = "22"

btw self.tableview.cellforrowatindexpath(sender.indexpath) can return nil if cell not visible


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -