I have a layout with a custom status bar on top [below Apple's status bar], then a UIScrollview
that paginates left to right in the middle section, and then I have a UIView
with some custom buttons on the bottom. So a simple three-paned layout, and it works great. However, the three custom buttons on the lower view bring up a ModalViewController
, and when that is dismissed, it resizes the middle UIScrollView
to full-screen, and brings it to the front, covering the other two views that I have.
There are several others who have noted this behavior, but it seems that the only answers they are given is to re-resize the UIScrollView
back to the original coordinates. This will work, of course, but it seems like a hack to me, and I would like ot know what is really going on behind the scenes here, and how to rectify the issue correctly.
Other SO links with the same apparent issue:
Still others have noted that the behavior only affects 3.0 and up, so I am not sure if this is a "feature," and I am just not understanding what the behavior is supposed to be doing, or what. If anyone can shed some light on this, I would be grateful.
I have exactly the same problem. In the parent of the modal view, I'm using this:
-(void)viewWillAppear:(BOOL)animated{
[self.view setFrame:CGRectMake(0, 0, originalWidth, originalHeight)];
}
where originalWidth & originalHeight are the original sizes of my parent view.
it works fine, even if it sounds like a hack to me too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With