If the view is part of the view hierarchy, use the window
property.
UIView* topView = self.view.window;
Or if your view is not on screen yet, you can get the window indirectly through your app delegate
UIView* topView = [UIApplication sharedApplication].delegate.window;
Else, if your target is not the window, you can walk up the view hierarchy until you find the view you want:
UIView* topView = self.view;
while(topView.superview != nil){
topview = topView.superview;
if( /*topview is the one you were looking for*/ ){
break;
}
}