Closed OSemenovBoyarka closed 8 years ago
@KrauseFx would you have chance to look through this changes and merge them if all is ok? Currently I'm using it, but it's not very nice to use non-official gem version on build server :)
I've merged this PR brach with latest master, tested and it works absolutely fine for me. Guys, please, look though it :)
FYI - this require update of SnapshotHelper.swift
I'm unsure about the SnapshotHelper.swift
update. Most existing users won't update their SnapshotHelper.swift
, will this still work then? What happens if you have an old helper file?
Unfortunately, I haven't found better way to detect orientation, than marking it explicitly in filename. We can detect image proportions on final collect stage, directly from image files, but I'm afraid it will take too much time.
As for using with old SnapshotHelper - no problem, it will work as before, just will not group screenshots by orientation. Just checked.
@SemenovAlexander I'm going to close this as we're moving to a mono repo very shortly. I like the idea of detecting orientation from the file size of the output image, I wonder if there's a minimagic
way getting the image size and just assuming that anything wider than it is all is portrait.
Really sorry for screenshots duplication issue in #335. This pull request fixes that and now all should work fine. As for me it works :)
Also this will setup valid
UIDeviceOrientation
after calling snapshot. Because previously - orientation was still.Unknown
even after simulator reboot.