I have a quiz.vc and i am passing an NSString from on vc to another and it passes null. (i am using a UITextView)
Quiz.h
@property (nonatomic,strong) IBOutlet UITextView *textField;
@property (nonatomic, retain) NSString *userText;
Quiz.m
- (IBAction)next:(id)sender {
// i have tried NSString *userText also and passing in userText to sfvc.string
self.userText = self.textField.text;
selectFriendsViewController *sfvc = [[selectFriendsViewController alloc] init];
sfvc.string = self.userText;
}
selectFriendsViewController.h
@property (nonatomic, strong) NSString *string;
selectFriendsViewController.m
- (void)viewDidLoad {
[super viewDidLoad];
NSLog(@"%@", _string);
}
its always logging null at runtime? i have tried so many ways and methods! any ideas as to how i can pass a string and not null???
Thanks