Snap.swift
Snap.swift copied to clipboard
UITraitCollection support
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
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!!