开发者

Refresh table view iphone

I've set a tableview, I have set a system which set if the row have been already selected, I set checkmark accessory for a row which开发者_StackOverflow中文版 have been seen, I write the row in a plist to an int value. It works well but only when I restart the app or reload the table view in my navigation controller.

I mean when I select a row it pushes a view controller, then when I go back to the tableview checkmark disappear and we do not know if the row have already been selected only when the app restart.

So is there a way to refresh the table view? In the view will appear, for example?


Have you tried a simple [tableView reloadData]?


I know it's more than a year later, but for others that come along...this works in iOS 5.0.

[[self tableView] reloadData];


For Swift 2

override func viewDidAppear(animated: Bool) {

dispatch_async(dispatch_get_main_queue(), { () -> Void in
self.tableView.reloadData()
})
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜