how to clear all the rows of uitableview

前端 未结 8 744
半阙折子戏
半阙折子戏 2021-01-02 23:32

I added a button on the uinavigationbar I want to use it to clear all the rows of uitablview

How can I do that?

8条回答
  •  旧时难觅i
    2021-01-02 23:59

    Simple.. set your data source (NSArray or NSDictionary) to nil and [self.tableView reloadData]!

提交回复
热议问题