I have UINavigationController which needs to be displayed right after my root UINavigationController using storyBoard segue.
[self performSegueWithIdentifier:@"LoginViewController" sender:self];
This storyBoard segue is Modal.
On top of this LoginViewController I embedded YouTube video using the snippet here.
While the video is playing, pressing on the “Done” button will cause my LoginViewController to be dismissed along with the video.
It also happens when the video ends.
Is there any way to handle the “Done” button? is there any notification which Let me know when the video ends?
Thanks in advance
I found a notification which helped me to know when the video end but you will have to use it carefully.
Apparently, When the youTube video plays, it appears on top of the UIWindow, So just before you trigger your video register the UIWindowDidBecomeVisibleNotification notification. Like this:
When the video ends, The UIWindow comes visible again and and there you should remove the notification.