add entires from textfield to UITableView to automatically populate

前端 未结 2 500
小鲜肉
小鲜肉 2020-12-21 20:04

This is the code I have so far. I am able to enter into the textfield and have it appear in the UITableView, but only after I reload the page and come back to it. I want for

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-21 20:34

    You need to tell the table view to reloadData() whenever the items array changes. So try adding table.reloadData() to the end of your add function.

提交回复
热议问题