开发者

How can I add to the contents of UITableView via a button?

开发者 https://www.devze.com 2023-01-15 14:12 出处:网络
I have a UITableView subclass which initially holds nothing, however by pressing a button I want to be able to add a string to the data and have it show开发者_JAVA技巧 up in the view. How can I do thi

I have a UITableView subclass which initially holds nothing, however by pressing a button I want to be able to add a string to the data and have it show开发者_JAVA技巧 up in the view. How can I do this? I have been trying to simply modify listdata, but this only seems to work once as after that the Table view does not reload, even though I can see more things are being added to list data. Am I missing something? Any help would be greatly appreciated!


See Inserting and Deleting Rows and Sections.


When you have added it to the datasource, call [yourTableViewObject reloadData];.

0

精彩评论

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