Reloading UITableView shows error?

后端 未结 2 1680
渐次进展
渐次进展 2020-12-20 10:38

I am in a strange situation . when i try to reload the tableview using reloadData() it shows the following error . . .

fatal error: unexp

2条回答
  •  旧巷少年郎
    2020-12-20 11:03

    Solution found !!!! :)

    Thanks to Abhinav for giving me the thread even though his suggestion failed.

    var array : NSArray = self.view.subviews
    array.objectAtIndex(0).reloadData()
    

    I got the same error for this also. So I tried this and worked

    var array : NSArray = self.view.subviews
    array.objectAtIndex(2).reloadData()
    

    Here in this array my tableview is at 2nd index. So my suggestion is to check the array to identify the tableview object first and use the index.

提交回复
热议问题