How to show NSTimer's time value in UITableViewCell's label

瘦欲@ 提交于 2019-12-25 07:14:35

问题


...continuing question How to set Action for UIButton in UITableViewCell

I have NSTimer working in singleton. There is only 1 timer, but it contains a Dictionary with several items which contains time values. Every minute timer decrements 1 from time value of all items in dictionary. The dictionary's structure is:

Key: "1", Value: Array with objects NSString, NSInteger (time value)

TimerCell is a tableViewControllers's cell. UITableViewController appears in UIPopoverController. So I would like to show dictionary's item's time values in my cell.label...

Edit: way found

I have created new NSTimer in my UITableViewController, which starts in viewDidLoad and every 1 second takes new value in singleton's timer and shows it in my cell.label...

If this way is incorrect or have memory leak, please correct me ))

来源:https://stackoverflow.com/questions/15653729/how-to-show-nstimers-time-value-in-uitableviewcells-label

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!