iPad orientation in SplitView

I’ve been trying to use the following:

[quote]Public Function orientation_isPortrait(extends v as iOSView) as boolean
return v.ContentSize.Width < v.ContentSize.Height
End Function

to determine the current iPad orientation - but discovered it doesn’t work for a detail view inside a split view. Is there a better way or do I have to resort to declares?