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

Rotation breaks the layout #106

Open
Sjoerdjanssenen opened this issue Apr 5, 2019 · 2 comments
Open

Rotation breaks the layout #106

Sjoerdjanssenen opened this issue Apr 5, 2019 · 2 comments

Comments

@Sjoerdjanssenen
Copy link

In my app I have a UISplitViewController as the base. Now, when I present a UIViewController as a card on top of it, the view will look like this.

image

However, when I rotate the device and then rotate back, the layout breaks and it will look like this.

image

When I then rotate once more and once more back, the app will crash, throwing this:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Multiplier is not finite!  That's illegal.  multiplier:-inf'
*** First throw call stack:
(
0   CoreFoundation                      0x000000010759a6fb __exceptionPreprocess + 331
1   libobjc.A.dylib                     0x0000000106b3eac5 objc_exception_throw + 48
2   CoreFoundation                      0x000000010759a482 +[NSException raise:format:arguments:] + 98
3   Foundation                          0x000000010658c927 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4   Foundation                          0x000000010679255e -[NSLayoutConstraint _setMultiplier:] + 336
5   Foundation                          0x000000010679949f +[NSLayoutConstraint constraintWithAnchor:relatedBy:toAnchor:multiplier:constant:] + 575
6   DeckTransition                      0x000000010319992b $s14DeckTransition0A22PresentationControllerC29updateSnapshotViewAspectRatio33_71FA53A27BEAE2D482201C2CF371A196LLyyF + 1931
7   DeckTransition                      0x000000010319a09a $s14DeckTransition0A22PresentationControllerC31containerViewWillLayoutSubviewsyyF + 298
8   DeckTransition                      0x000000010319a644 $s14DeckTransition0A22PresentationControllerC31containerViewWillLayoutSubviewsyyFTo + 36
9   UIKitCore                           0x0000000111070905 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1229

Any ideas as to what could be causing this? I have a feeling it's a layout issue in the library, but I have no clue where to start looking...

@HarshilShah
Copy link
Owner

Sorry for the late response. Just scanning the crashlog and the bug seems related to the snapshot view. I’m planning to get rid of that entirely in an upcoming release which should fix the issue, but in the meantime it’d be great to have a minimally reproducible example based on the project’s Example app so I can confirm that the bug is indeed getting fixed with the changes.

@ifamirhasan
Copy link

Any solution for rotation ?

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

3 participants