I have 2 viewControllers:
- VC1
- VC2
(VC2 presented on top of VC1)
I need to know in advance the (CGPoint) position of a subview of VC1 whenever I am in VC2 so that I can apply an animation dismissing VC2.
I thought about implementing delegates and protocols and this is what I have done:
protocol PreviewCapturedViewControllerDelegate {
func retrieveIconPosition() -> CGPoint
func goToProfilePosition()
}
But I actually don't know how to retrieve the position of the view using this protocol.