Select your custom view (usually by double-clicking it, the first time you click will only select the parent container view) then "View Info" with CMD + SHIFT + I. Switch to the Size property sheet. In the white box, click the center so that both the horizonal and vertical "springs" appear. This will make it stretch to fit its parent container during live resize.
If you don't want it to resize but just stick, click on the outside of the white box and enable those springs. It's probably a combination of spings ton the top and left side, or on the bottom and right side. Alternate and test the interface to see which combo works the way you want it to. But putting springs on all 4 sides might not be desireable.