Does using [self presentModalViewController:videoViewController animated:YES];
stack up multiple views?
On videoViewController I'm loading in several UIWebViews and each one of them loads in a video. And I have a button on that view which allows the changing of categories. When the category button is clicked, it shows a popover view and inside that view are several buttons for different categories. When one of them buttons are pressed, I'm doing the following to get back to videoViewController:
VideoViewController *videoViewController= [self.storyboard instantiateViewControllerWithIdentifier:@"VideoVC"];
[self presentModalViewController:videoViewController animated:YES];
Which works, it dismisses the category popover view and goes back to videoViewController loading in different videos. But then, changing the category a few times my app is starting to crash after getting 'did receive memory warning' messages.
I have a category 'all' which loads in all the videos and don't get no such message, but then changing the category several times (each category of course loads in less videos as it's being filter) I'm getting warnings.
So my real question really is, when I'm changing category and calling [self presentModalViewController:videoViewController animated:YES];
is it just racking up a view every time I change category? So for instance if I change category 5 times, will I have 5 videoViewController views just sat on top of each other? If so, what's the best way about going to avoid this?
I tried [self presentModalViewController:videoViewController animated:YES];
instead to see if that would make a difference, but the viewViewController doesn't reload and the category popover view doesn't dismiss.
This is for an iPad app if that makes a difference.
Thanks.