UI Frame Detection

Is it possible to detect when a UI frame touches or is on top of another frame?