I Have an application in which i had the array of view controllers
now i want to pop to a particular vie controller .also i need to set the value of a string object inside that viewcontroller to nil.I am doing like this ,but how to set the string value inside that view controller is my bottle neck?can anybody help me?`
NSArray *array1 = [self.navigationController viewControllers];
NSLog(@"%@beforelogout",[self.navigationController viewControllers]);
[self.navigationController popToViewController:[array1 objectAtIndex:1] animated:YES];
`
i need to set the string inside [array1 objectAtIndex:0].?
First, your
[array1 objectAtIndex:0]is simply your navigationcontrollers rootview. You could do like this:Change the “RootViewController” to the self made class of your rootview.