Disregard the call view question I found out how to do it. Now here is where I am extremely confused. I have the following code:
Code:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:YES];
if (courseCount == 0) {
courseCount++;
}
else {
[self courseDataAdd];
NSLog(@"%@", [courseData objectAtIndex:0]);
}
}
Code:
- (IBAction)courseNameConfirm:(id)sender {
[self courseDataAdd];
[self.tableView reloadData];
[gradeSummaryNavigation dismissModalViewControllerAnimated:YES];
}
Code:
- (void)courseDataAdd {
arrayCount = arrayPosition;
id object1 = [courseData objectAtIndex:arrayCount];
for (int i = 0; i < 100; i++) {
if ([[object1 objectAtIndex:i] isEqualToString:@""]) {
[object1 insertObject:courseNameField.text atIndex:i];
break;
}
}
[self.tableView reloadData];
}
Now when I press my button for the courseNameConfirm method, it calls the courseDataAdd method with no problems and it displays the values on my table. However, when I try to call the same courseDataAdd method in viewWillAppear, it returns the value of my array as (null). Could this be due to a presentModalViewController? If not, what are some of your thoughts? Any help would be greatly appreciated!