Search code examples
iphoneipaduinavigationcontrollerpresentmodalviewcontroller

How can i navigate forward and backward with out navigation controller


i am using UIViewcontroller in my application and i want to navigate forward when click on the button, and in 2nd view when i click back, the view is navigate back like navigation controller.How can i do this?I am not using navigation controller and i can't.Thanks


Solution

  • You can add the second view as a subview of first one (with same size), to come back in to first view use the function removeFromSuperView from second view.