tags:

views:

473

answers:

1

Hi,

I have 2 views, each for portrait and landscape. I start by displaying the portrait view. On both the views, I have a button, which presents a modal view on clicking it. When the modal view comes up and then I rotate the iPad, the portrait view is replaced by the landscape view, but the modal view goes behind this view. Any idea how to bring the modal view again to the front after the rotation?

Thanks for the help Farha

A: 

You can use:

-(void)bringSubviewToFront:(UIView *)view

As long as you have the super view and the view you want to bring to the front.

Chris Cooper
thx for the reply Chris. I did try this but it also did not work. This is what I had tried:-[self.view bringSubviewToFront:[self modalViewController].view];any changes in this?Thanks,Farha
Farha Ansari