I'm working on a baseball game app that contains multiple Modal View Controllers. However, when I make the modal transition from "BasicGameSetupViewController" to "BasicViewController", the transition happens (because I have NSLog statements within my ViewDidLoad method in the BasicViewController), but the actual view does not update. Here is the method where I transition to the BasicViewController (this code is in BasicGameSetupViewController):
- (IBAction)pressedBeginPlay:(id)sender {
numOfInnings = [selectInnings selectedSegmentIndex];
numOfInnings = numOfInnings + 1;
row = [teamSelector selectedRowInComponent:0];
visitor = [teams objectAtIndex:row];
row = [teamSelector selectedRowInComponent:1];
home = [teams objectAtIndex:row];
NSLog(@"%@", visitor);
NSLog(@"%@", home);
if([awaySelect selectedSegmentIndex] == 0)
{
awayPlayer = @"Human";
}
else
{
awayPlayer = @"CPU";
}
if([homeSelect selectedSegmentIndex] == 0)
{
homePlayer = @"Human";
}
else
{
homePlayer = @"CPU";
}
[self performSegueWithIdentifier:@"startBeginnerToBasic" sender:self];
}
(This block also has a "prepareForSegue" method) And here is the viewDidLoad method in BasicViewController:
- (void)viewDidLoad{
NSLog(@"Made it to basic View controller");
homeLineup = [[NSMutableArray alloc] initWithCapacity:9];
visitorLineup = [[NSMutableArray alloc] initWithCapacity:9];
batter = [[NSMutableArray alloc] initWithCapacity:22];
homePitcher = [[NSMutableArray alloc] initWithCapacity:22];
awayPitcher = [[NSMutableArray alloc] initWithCapacity:22];
pitcher = [[NSMutableArray alloc] initWithCapacity:22];
homeAlreadyPitched = [[NSMutableArray alloc]initWithCapacity:5];
awayAlreadyPitched = [[NSMutableArray alloc] initWithCapacity:5];
NSLog(@"arrays initialized");
[super viewDidLoad];
[self setUpTeams];
[self checkForComputer];
[self newBatter];
[self atBat];
// Do any additional setup after loading the view.
}
I'm completely stumped as to why my view isn't showing. The NSLog statements that are in the ViewDidLoad code block above show up, but the I can't get the view to show. Does anyone have any ideas? Thank you in advance for your help!