Fix for showing alert sheets in a window (which are UIView subclasses)

This fixes presenting an action sheet in a window. Works fine in my testing.