Though Interface Builder has Bring to Front / Send to Back commands, the Cocoa view architecture doesn't actually doesn't make any provision for layering, so there's no guarantee what order things will appear at runtime.
The only way to be sure about this sort of thing is to make the view that's on top be a subview of the view on the bottom. I think you still can't do this in IB (it has this hardcoded notion of what controls are "supposed" to be container views, but really any view can), but it's pretty easy to set it up in IB and then swizzle the containment at runtime. (This is how we do the popup-arrow trick in OmniWeb's back and forward toolbar buttons.)