This question refers to the native iOS function of displaying actionsheets and popovers when a phone number or email is selected in a webview/textview from an iPad. In case you need a refresher, the actionsheet contains two buttons that read "Add to Contacts" and "Copy". Where the popover that I am referring to is what is displayed when the user selects the "Add to Contacts" button.
I understand that to dismiss a popover one declares:
[somePopoverController dismissPopoverAnimated:YES];
To dismiss an actionsheet, one can simply call:
[someActionSheet dismissWithClickedButtonIndex:0 animated:YES];
However, my problem is that since iOS created these actionsheets/popovers for me, I do not own them, and cannot reference them to call the dismiss methods.
The use case of why I need to do this is because my application will log the user out after a specified time of no activity. When the user is logged out these actionsheets/popovers still remain on the screen, even though I have entered a new view controller and removed the old ones.
Does anyone know of how I can reference these popovers and actionsheets that I do not own? Any advice would be greatly appreciated!