Skip to content

Button constraints are corrupt on iPad / button is moving when closing MenuViewController #66

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

Closed
welljsjs opened this issue Nov 30, 2017 · 3 comments

Comments

@welljsjs
Copy link

welljsjs commented Nov 30, 2017

Hey,

I am having some trouble with InteractiveSideMenu.
I tried to use the framework for iPad running iOS 11, but there seems to be a problem; the first time I close the side-menu, my button moves about 20px to the top.
I attached some pictures of it. I am using the same constraints as in your official Sample project.

The console output:

[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. 
(
    "<NSLayoutConstraint:0x600000280550 UILayoutGuide:0x6000001b9360'UIViewSafeAreaLayoutGuide'.bottom == UITableView:0x7f8f3f823c00.bottom + 20   (active)>",
    "<NSLayoutConstraint:0x600000280730 UITableView:0x7f8f3f823c00.centerY == UIView:0x7f8f3f400ce0.centerY   (active)>",
    "<NSLayoutConstraint:0x600000280780 UITableView:0x7f8f3f823c00.top == UILayoutGuide:0x6000001b9360'UIViewSafeAreaLayoutGuide'.top   (active)>",
    "<NSLayoutConstraint:0x600000280640 'UIViewSafeAreaLayoutGuide-bottom' V:[UILayoutGuide:0x6000001b9360'UIViewSafeAreaLayoutGuide']-(0)-|   (active, names: '|':UIView:0x7f8f3f400ce0 )>",
    "<NSLayoutConstraint:0x6000002805a0 'UIViewSafeAreaLayoutGuide-top' V:|-(0)-[UILayoutGuide:0x6000001b9360'UIViewSafeAreaLayoutGuide']   (active, names: '|':UIView:0x7f8f3f400ce0 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x600000280730 UITableView:0x7f8f3f823c00.centerY == UIView:0x7f8f3f400ce0.centerY   (active)>

This might refer to #53 , but I am not sure.

bildschirmfoto 2017-11-30 um 21 16 25

bildschirmfoto 2017-11-30 um 21 17 20

bildschirmfoto 2017-11-30 um 21 17 27

bildschirmfoto 2017-11-30 um 21 17 33

@hintoz
Copy link

hintoz commented Dec 1, 2017

Known Issues
There is an issue associated with scaling of NavigationBar in iOS 11. Status bar background is hidden during side menu closing if contentScale < 1. It’s supposed to be iOS 11 Navigation Bar issue that's been reported to Apple.

@enmiller
Copy link
Contributor

enmiller commented Feb 9, 2018

@welljsjs
There appears to be a critical range with the contentScale property of the TransitionOptions that causes the odd behavior. When using a contentScale of 0.87 - 0.90, there seems to be an issue with the content controller's view not getting its safeAreaInsets set properly. From testing, I can only see it affecting those four values in that range.

I will continue to look into the issue but, for now, I will update the default value of the contentScale to be outside of this range so that the library works on iOS 11 by default

For now, you can change the transitionOptions to be outside of that range and you should see things improve.

@enmiller
Copy link
Contributor

enmiller commented Feb 9, 2018

@welljsjs
Try using 2.2.1. The default contentScale was changed to be outside of the affected range that causes the safeAreaInsets not to be set properly on the content controller.

I will still be looking into this issue to see how I can make things work no matter the contentScale setting but this is the best I can do for now.

@enmiller enmiller closed this as completed Feb 9, 2018
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