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

Expanded message for UIView-Encapsulated-Layout constraints #6

Open
pipelineoptika opened this issue Nov 27, 2017 · 6 comments
Open

Comments

@pipelineoptika
Copy link

UIView-Encapsulated-Layout-* constraints are commonly added by collection views et al, but are also the resultant constraints from translatesAutoresizingMaskIntoConstraints. In projects where constraints are being added to old frame-based layouts, knowing this can be really helpful.

@johnpatrickmorgan
Copy link
Owner

Thanks for raising this issue. I was under the impression that constraints that have been translated from autoresizing masks have an additional piece of info in their description, in the form h=--& v=--&. E.g.:

"<NSAutoresizingMaskLayoutConstraint:0x60000089a130 h=--& v=--& UIView:0x7f95000e5ac0.width == 70   (active)>"

Currently any descriptions that include this info are determined to have been translated from autoresizing masks, regardless of whether they have an identifier with the prefix UIView-Encapsulated-Layout-.

The documentation seems to confirm this. Are you seeing NSAutoresizingMaskLayoutConstraints printed without the h=--& v=--& info?

@pipelineoptika
Copy link
Author

Not as such - what I'm seeing is this:
"<NSLayoutConstraint:0x11a9ade60 'UIView-Encapsulated-Layout-Width' Document Base.width == 1366 (active, names: Document Base:0x1192fbcf0 )>", where Document Base is just the accessibilityIdentifier.

The main thing to note is that I have no table or collection views in the hierarchy, but I did have autoresizing masks that needed to be removed.

I don't know if this helps?

@pipelineoptika
Copy link
Author

This is as at iOS 11, which appears to make some changes in this area. This post suggested it, and it seems reasonable based on what finally fixed my layout issue (which was correctly dealing with those masks).

https://stackoverflow.com/a/46738140/466345

@johnpatrickmorgan
Copy link
Owner

@pipelineoptika Thanks very much for the additional info; I will have a deeper look. Just to check, are you using any Auto Layout frameworks such as SnapKit in that project?

@pipelineoptika
Copy link
Author

No, none - it's just vanilla XIBs.

@pipelineoptika
Copy link
Author

By the way - thank you so much for this tool. It's helped us greatly! ❤️

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

No branches or pull requests

2 participants