views:

71

answers:

2

I created a uiview(with two buttons) covers all the screen whenever i click on any one of button i want to transfer my control on previous screen what can i do in iphone?

A: 

Hi, Sichita

code for navigating from one view to another is as belove :

DetailViewController *detailViewController;
[self.navigationController pushViewController:detailsViewController animated:YES];

and for going back :

[self.navigationController popViewControllerAnimated:YES];

leave comment if have any trouble... and click on correct sign if its correct...and votes up the answer to help another guys to see it.

yakub_moriss
The question asked how to display the previously active view, not how to push a new view. mihirpmehta's solution is the correct approach to the problem.
mmccomb
Hi,mattmccomb i know what you are saying but see the title of the question first and then read the whole story. hope you understand from which context i have given this answer...
yakub_moriss
A: 

if you are using NavigationController than for going back to previous view...

[self.navigationController popViewControllerAnimated:YES];

Otherwise

[self dismissModalViewControllerAnimated:YES];
mihirpmehta