I've put together a text field that can take text and save it and output it into a label on the same controller page. My question is how do I use another controller page (using tab view controller) and output the same text on the second controller.
I've linked the label as the same IBOulet that the text is saved as.
Below is my code for the firstcontroller.m
#import "FirstViewController.h"
@interface FirstViewController ()
@property (nonatomic, strong) IBOutlet UILabel* label;
@end
@implementation FirstViewController
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
self.label.text = @"";
return TRUE;
}
-(BOOL)textFieldShouldReturn:(UITextField *)textField{
[textField resignFirstResponder];
self.label.text = textField.text;
return YES;
}
-(void)textFieldDidBeginEditing:(UITextField *)textField{
textField.text = @"";
}
Thanks in advance