How exactly do I dismiss a modal view controller at the bottom of the stack (to get back to the main screen) if I am currently in the topmost view of the stack?
From the Developer Documentation for dismissModalViewControllerAnimated:
If you dismiss a modal view controller in the middle or bottom of the stack, all the modal view controllers on top of that view controller are also dismissed. Use the modalViewController property before invoking this method if you need to retain the modal view controller.
alright i was on the right track before but now I think I figured it out
basically you just have to dismiss every single modal view starting with the bottom-most and then once all the modal view have been dismissed, you have to present the bottom one again. That will take you from the topmost modal view back to the first one.