I have an app that I load a GameScene form a CollectionView. I load the view just fine, but when I'm done I can't seem to be able to return to the collectionView.
I have tried
[self dismissModalViewControllerAnimated:YES];
and
[GameScene dismissModalViewControllerAnimated:YES];
and
[collectionViewController dismissModalViewControllerAnimated:YES];
but they all say No Visible @Interface
For viewController
declares the selector dismissModalViewControllerAnimated:
Here is the code where I load the GameScene from the collectionView
-(void) collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row==0) {
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *vc = [sb instantiateViewControllerWithIdentifier:@"GameSceneOne"];
vc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
NSLog(@"mycell.image1.image:%@",myCell.image1.image);
[self presentViewController:vc animated:YES completion:NULL];
}}
Any Ideals of how to dismiss the gameScene and return to the CollectionView?