Ok, where to begin?
Your data source is providing cells based on ids , which you never update. So, of course your data source will never know about the update. When you add the rows, you should also update ids and ids1 . Even better than using a global variable, you should create an instance of your data source, and then add ids as an attribute to your instance.
Other issues:
self.cells = [ui.TableViewCell('value1') #'subtitle'
for _ in range(len(self.data))]
This is not doing what you think... cell for row gets called EVERY time a cell comes into view. You are creating and throwing away a zillion TableViewCells. If you want to reuse cells, fine, but create them in __init__ . But then don’t forget to append to it in your button callback.
You should never call reload, until your data source is prepared to provide the new rows (or in case of delete, your data source must know the rows are deleted). If you keep your data up to date, then you never actually need to call reload, unless you have somehow changed your entire table.
Tableviews can be a bit tricky — the whole idea is that the table view and tableviewcells are not the data, they are just a lightweight view showing a window to the data. Don’t worry about trying to cache the table view cells — just create a new cell, fill in the info about the row, and return it. The OS magic then handles displaying the cell. The OS will query your data source before the first view to figure out how many cells there will be, and then figures out how many cells will fit on the screen, and only asks for that many cells. As you scroll, it is asking for cells. If you call add or delete, it will ask for data about the inserted cells.