slightly improved the ui restoration method
if the modal view has a parent view controller (such as i do) it will store a reference so that it may be restored by the parent view controller.