I have a table view and it is load from table view cells. But I want to see this table’s values after click a button.
With this method - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;,
I can see all data when view did load.
But firstly I dont want to see datas. I want to see thats after click a button. How can I do this?
Keep your table source equal to nil, then when the button is pressed set it to the list of values you need and reload the table view.
so … if your table source is let’s say the ivar NSArray* tableData, and the array with your values is the ivar NSArray* values then in your IBAction for your button you should do :
That’s about it