TL;DR: I have an object in a VC that needs initiate an unwind method from its VC. Anyone know how?
Details & Code:
I have a custom UIImageView called UIImageViewQuestion
. When the viewController it is contained in (PreKnowledgeViewController
) is loaded I run this standard creation code:
UIImageViewQuestion *imageView = [[UIImageViewQuestion alloc] initWithImage:questionsArray[[myVariables sharedGameData].currentQuestionInt]];
imageView.contentMode = UIViewContentModeScaleAspectFit;
imageView.clipsToBounds = YES;
imageView.frame = CGRectMake(0,0, 320, 504);
[self.view addSubview:imageView];
imageView.userInteractionEnabled = true;
Standard. But, when that UIImageViewQuestion
receives a tap, I perform some logic in there to determine the position of the tap and decide if the user has selected the proper position. After this is where I need to perform an unwindSegue from PreKnowledgeViewController
.
Also, if I seem to have any glaring errors in my logic or a silly line of code, please let me know. I definitely don't fully know what I am doing.
Thanks for the help!