jemmons
Follow
Pinned Loading
-
-
-
-
Draws a `singlePixelLine` line above...
Draws a `singlePixelLine` line above or below the given point, depending on `topBias`. 1import UIKit
23func singlePixelLine(at y: CGFloat, in rect: CGRect, topBias: Bool = true) {
4let offset = pixelUnit/2.0
5let adjustedY = round(from: y - offset, fraction: pixelUnit, down: topBias) + offset
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.