i would like to take text from a quiz vc to a category vc so i can upload to parse.com. the user inputs text into a UITextView presses next and goes to the category VC and sends via parse.com
in the quiz.h file
@property (nonatomic,strong) IBOutlet UITextView *textField;
@property (nonatomic, strong) NSString *text;
in quiz.m
NSString *text = [NSString stringWithFormat:@"%@", [self.textField text]];
IBAction next method{
categoryViewController *cvc = [[selectFriendsViewController alloc] init];
cvc.string = text;
[cvc setString:text];
}
in the category.h
@property (nonatomic, retain) NSString *string;
selectfriends vc.m
- (void)viewDidLoad {
[super viewDidLoad];
quizViewController *qvc = [[quizViewController alloc] init];
qvc.text = self.string;
UITextView *textfield = [[UITextView alloc] init];
self.string = textfield.text;
[self.textField setText:self.string];
NSLog(@"%@", self.string);
}
the string does not print and it does not show null + i can not delete anything in the viewdidload as then file then does not upload to parse.com (im uploading text as file). textfile on parse.com is blank. how can i get the string to show and upload to parse?