Can't use reloadData from another class

前端 未结 7 2008
栀梦
栀梦 2021-01-15 03:56

I have 2 classes, classA and classB In classA I have a tableview that works and refreshes on demand. all the delegates and datadource are fine and there\'s also a property <

7条回答
  •  清酒与你
    2021-01-15 04:35

    check is your UITableView property is valid at the moment you call reloadData. UIViewController is created by calling alloc init, but your view is currently in invalid state. Set breakpoint in reloadData line of code and check is you .tableView == nil?

提交回复
热议问题