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

Autolayout errors when in-call statusbar is visible #61

Closed
otymartin opened this issue May 30, 2017 · 3 comments
Closed

Autolayout errors when in-call statusbar is visible #61

otymartin opened this issue May 30, 2017 · 3 comments
Labels

Comments

@otymartin
Copy link

@msaps

When in-call StatusBar/hotSpot StatusBar is present (On device, havent tried simulator), the following auto-layout errors are given by the compiler.

This can be recreated on the pageboy example app by just turning on personal hotspot and launching the app on device.

2017-05-30 11:51:07.328140+0300 Pageboy-Example[2099:469758] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
	(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x170098ba0 h=-&- v=-&- _UIPageViewControllerContentView:0x100d08a20.midY == UIView:0x100d12150.midY + 20   (active)>",
    "<NSAutoresizingMaskLayoutConstraint:0x170098bf0 h=-&- v=-&- _UIPageViewControllerContentView:0x100d08a20.height == UIView:0x100d12150.height   (active)>",
    "<NSLayoutConstraint:0x170096a80 V:|-(0)-[_UIPageViewControllerContentView:0x100d08a20]   (active, names: '|':UIView:0x100d12150 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x170096a80 V:|-(0)-[_UIPageViewControllerContentView:0x100d08a20]   (active, names: '|':UIView:0x100d12150 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2017-05-30 11:51:07.334525+0300 Pageboy-Example[2099:469758] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
	(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x170098ba0 h=-&- v=-&- _UIPageViewControllerContentView:0x100d08a20.midY == UIView:0x100d12150.midY + 20   (active)>",
    "<NSAutoresizingMaskLayoutConstraint:0x170098bf0 h=-&- v=-&- _UIPageViewControllerContentView:0x100d08a20.height == UIView:0x100d12150.height   (active)>",
    "<NSLayoutConstraint:0x170096e40 V:[_UIPageViewControllerContentView:0x100d08a20]-(0)-|   (active, names: '|':UIView:0x100d12150 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x170096e40 V:[_UIPageViewControllerContentView:0x100d08a20]-(0)-|   (active, names: '|':UIView:0x100d12150 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
@msaps
Copy link
Member

msaps commented May 30, 2017

Looks like something interesting inside UIPageViewController having some autoresizing masks when it potentially shouldn't. I'll take a look! 👍

@msaps
Copy link
Member

msaps commented Jun 7, 2017

@otymartin this should now be resolved as of 1.1.0 😄

@msaps msaps closed this as completed Jun 7, 2017
@otymartin
Copy link
Author

@msaps Nice thanks man :)

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

No branches or pull requests

2 participants