Wednesday, October 16, 2013

dismissModalViewController will lead to the location of the parent view recovery how to do?

As follows, creates a view A, and A has been translated (by setting the bounds origin to achieve, because transform lead frame change)
Then presenModalViewController modal pop-up window, and then dissModalViewController to return to the original view.
The problem is that after A return to the original view, panning effect disappears, A view of the translational resumed before the appearance. Is there any way to stop this recovery operation?
PS: Personal tried in viewDidDisappear in record A bounds, and then to recover in viewWillAppear can get a similar effect. But seemingly
Unstable, so if there is a more standard or better solution would be greatly appreciated.
Reply:
It has introduced the sdk do?
Reply:
There is no check Resize View from Nib? The default is checked, you cancel the try?

Reply:
2F reply quote:
have not checked Resize View from Nib? The default is checked, you cancel the try?


I use Xcode4.2, builder has no Resize View from Nib this a way, corresponds to a UIViewController specific methods or properties that do?
Reply:
autoresizesSubviews = NO;
Reply:
Little prospect of a solution, and found that if the set UIViewController.modalPresentationStyle to UIModalPresentationCurrentContext, then dismiss the modal view does not change when the parent view bounds. But correspondingly has generated another problem: the pop-up window transition animation effects useless. Further studies, thank you ~
Reply:
Found with ordinary method is still difficult to solve, but very interesting is if the first instance of a UINavigationController, then their ViewController push into it. In this case, re-use ModalView without any problems, does not appear after the parent view to restore bounds dismiss the case. So now I use a navigationBar invisible NavigationController to circumvent this problem ...... very sick, but later on more familiar ground floor and come back ios solve it, mark down again.

No comments:

Post a Comment