i want to use one data string stored in extern string variable in one view controller, in the other view by calling that variable in second view controller. and want to print the variable's value in the text box present in second view controller on a button click of button present in it. please tell me how i can do that using objective-C?
please tell what to do in all the 4 files that are: ViewController.h, ViewController.m, SecondViewController.h and SecondViewController.m.
- (IBAction)buttonPressed:(UIButton *)sender { self.titleLabel.text = self.textField.text; [self.textField resignFirstResponder]; NSString *var = self.textField.text; }