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

UITraitCollection support #48

Open
piercifani opened this issue Mar 17, 2018 · 1 comment
Open

UITraitCollection support #48

piercifani opened this issue Mar 17, 2018 · 1 comment

Comments

@piercifani
Copy link

When writing layout code, you should rely on the view/viewController's traitCollection instead of just the frame of the view.

However, when executing the snapshot tests for a device, the traitCollection during the test execution is the same as the current simulator, which is not ideal when using expect(view).toMatchSnapshot(for: .allDevices) since an invalid collection is passed here.

We should either notify this in the documentation or (preferably) override the traitCollection of the UIView using override trait collection

@skyweb07
Copy link
Owner

hey sorry for not answering before, I've been a little off, I'm checking now into making a better version but I don't understand the issue, could you provide more information or maybe opening a PR?

Thanks!!

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

2 participants