Created
June 1, 2021 00:58
-
-
Save gngrwzrd/cb5b4f82295bc237b9205f7c72bf8718 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inputs.sort { view1, view2 in | |
let view1Frame = view1.convert(CGPoint.zero, to: nil) | |
let view2Frame = view2.convert(CGPoint.zero, to: nil) | |
if view1Frame.y == view2Frame.y { | |
return view1Frame.x < view2Frame.x | |
} | |
return view1Frame.y < view2Frame.y | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment