I have a main view.
From that main view I show a modal view (MV1).
MV1 show another modal View (MV2).
*mainview coding:-
MV1 *MV1obj = [[MV1 alloc]initWithNibName:@"MV1" bundle:nil];
MV1obj.modalPresentationStyle=UIModalPresentationPageSheet;
[self presentModalViewController:MV1obj animated:YES];
MV1obj.view.superview.frame = CGRectMake(0, 0,730,620);
MV1obj.view.superview.center = self.view.center;
When I click on button in mainview, MV1 modelview is open and its width and height is 730 and 620. MV1 modelview contain one imagebutton. When I clicked on this button MV2 model view is open and display full screen image in model view Mv2.
*MV1 class coding:-
MV2 *MV2obj = [[MV2 alloc]initWithNibName:@"MV2" bundle:nil];
MV2obj.modalPresentationStyle=UIModalPresentationFullScreen;
[self presentModalViewController:MV2obj animated:YES];
But when I dissmiss model view Mv2, Mv1 model view is displayed in full screen. But I need to display Mv1 model view in 730 width and 620 height.
Can anyone tell me what is the problem with code?
Thanks.
Solved by explicitly setting center and frame once again. Write these lines into
MV2class when you dismissself: