Added a method to find the subview that is an ancestor of the given view.