ios - Xcode push and pop view to save data -


I'm trying to log in data with FirstView (a text field and a button) in the second instance (UiTableView) For example, contact list I want to briefly explain my code.

I've added a navigation controller with tabbar in AppDelegate.m;

  UIAVNCenter * Pointer = [[UINavigationController alloc] init]; Self.window.rootViewController = Pointer; [Notification set navigation bar: NO]; [Push Push ViewController: animated self.viewController: Yes];   

And I have a [self.navigationController pushViewController: animated push: yes]; is used to push the data on the second screen but always see it as a loop with any other navigation controller back button, then I [self.navigationController popToRootViewControllerAnimated: YES]; , which does not give the data in another view until I close the program completely, it will open it again. So is there a way to push and pop at the same time? Or can you show me another way?

Thanks in advance.

Note I have shared my code in this link;

By trying to create a singleton class that manages this data You can. Then you call the same singleton class in your code, you should keep the same condition throughout the life of your app.

Or, the simplest way is to set "myArray" as a property in your app. Representative .. Then, in your class implementation file, do something like this: < Previous> UIApplicationDelegate * appDelegate = [[UIApplication shared application] representative]; AppDelegate.myArray = newArray;

It assumes that myArray and newArray have been properly started.

Comments