Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-call status bar causes layout problems for shadow view #1

Open
eugene-ma opened this issue Mar 17, 2014 · 1 comment
Open

In-call status bar causes layout problems for shadow view #1

eugene-ma opened this issue Mar 17, 2014 · 1 comment

Comments

@eugene-ma
Copy link

  1. When the in-call status bar appears, it pushes the shadow view down as expected (like in a regular full-screen presented view controller), but when the in-call status bar disappears, the shadow view does not adjust itself to fill the screen again. This leaves a 20-point tall area at the top that is not covered by the shadow view.

  2. When the in-call status bar is shown, the custom alert view is laid out correctly if you present it in either portrait or landscape orientation, but when you rotate the interface, it is not. It is either shifted 20 points up or down, depending on which interface orientation you start out with.

You can see these issues easily by laying out, say, four 20-point tall views abutting each other top-to-bottom at the top of the screen. Create one set for the ViewController and another for CustomAlertViewController. Then you can compare one set against the other to see what is shifted down when the in-call status bar is shown or hidden. (See the attached images.)

issue 1
issue 2b
issue 2a
normal

@eugene-ma
Copy link
Author

One fix I found is to put constraints so that the "to" and "from" view controllers' views have matching center and bounds, but this causes other issues. First, the "to" view controller has to have no autoresizing flags to prevent an awful momentary layout glitch. Also, the "to" view controller needs to force layout in willAnimateRotation... to prevent a momentary glitch when rotating the interface with the in-call status bar showing (don't exactly know why this works). The last issue is that the layout does not animate smoothly when the in-call status bar disappears; I can't find a fix for this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant