I have a serious doubt. It may be simple, but I need some help with this.
I have a view (view1) and I navigate to (view2). There is a tableView in View 2 with some textFields (added as a SubView) , and I add some data to the textFields in the UITableViewCells.
I press the back button, and I go back to view 1.
If I navigate again to view 2, the textFields are in the exact same state as I had left it before. I want it to be nil, and show the placeholders in them. How do I make the textFields nil again without disrupting all the other data ?
I used NSUserDefaults in view 1 to let view 2 know that I am navigating. But … the method
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath and viewDidLoad does not seem to be called again. Only if it is called again, I can make the textFields inside the uitableViewCells nil.
Could someone tell me how I can call the tableViewCells everytime a navigate to view2 ?
I cannot believe I missed this. I do not know if I should delete this question…
[tableView reloadData];viewDidAppear;These two simple things did the trick !