I am sending my text from a view-1 to another view-2 which has a UITableView. When I push my data I to the other view-2 I can’t see the data until I close the application and open it again I can see that data in the table view.
I have used [self.navigationController popToRootViewControllerAnimated:YES]; and then reload the the table view but it doesn’t work.
More details; A(Add person button with UITableView)-> B(text field with submit button) -> A(Data shown on the table view). This is what I wanna do.
Could anybody help me please?
Here is my full code My Sample Code
Thanks from now.
I have seen your code and I Found one issue. just put below code from
viewDidLoadtoviewWillAppearmethodMay this will solve your issue.
Happy Coding 🙂
EDIT 1
Ok the new cause may be as I found with your code is in
submitmethod (IBAction).You create new view controller and just got to the rootview of navigation controller so change the first line of function
to
with the change of above ie my original answer also add the edited answer and see.
May this will solve your problem.
Happy Coding 🙂
FINAL EDIT
I got the issue and have the changes in your code as below
in ViewController.h file
instead of
use
next change is in ViewController.m file
in
viewWillAppear:animatedmethod instead ofuse
And your application will run as expected with no error or crash.
Happy Coding 🙂