How to navigate previous screen from camera view in iphone?
<p>Im new to iphone, i have custom back button in camera view and using poptoviewcontroller, its not working, but i want when i click the back button to navigate home screen, how? please any one help me.</p>

<p>I tried the source code</p>

<pre><code>backbtn=[UIButton buttonWithType:UIButtonTypeCustom];
backbtn.frame=CGRectMake(40, 10, 80, 40);
[backbtn setBackgroundImage:[UIImage imageNamed:@"backspace.png"]            forState:UIControlStateNormal];
[backbtn addTarget:self action:@selector(gotoprevious)  forControlEvents:UIControlEventTouchUpInside];

[buttonView addSubview:backbtn];


-(void)gotoprevious
{
     NSLog(@"Go to prevoius screen");
 Homepage *homepage=[[Homepage alloc]init];
 [self.navigationController popToViewController:homepage animated:YES];

 }
</code></pre>
