Use a navigation controller

dismiss via navigation controller pop
set autoresize mask