I am working on an iPhone application.In that app I am switching from one view to another by
loginpage *loginview = [[loginpage alloc]init];
[self presentModelViewController:loginview animated:YES];
[loginview release];
this code.It is working fine.But in the second view(loginpage) when I press back button than this code
[self dismissModalViewControllerAnimated:Yes];
gets fired and after that app crashes.Can anyone please help me out.Please suggest me what should I do to resolve this.Thanks in advance
Just declare the Object in
.hfile. thatloginpage *loginview; and release the Object in
-(void)deallocmethod.