Skip to content

Instantly share code, notes, and snippets.

@TarasShu
Last active June 30, 2020 12:28
Show Gist options
  • Save TarasShu/6220936a647cf239b6223919d7c6d73a to your computer and use it in GitHub Desktop.
Save TarasShu/6220936a647cf239b6223919d7c6d73a to your computer and use it in GitHub Desktop.
func lines(space: Int, context: CGRect, count: Int) -> [CGRect] {
var line = [CGRect]()
for arr in 0..<count {
let lineOne = CGRect(origin:context.minX + CGRect(space) * CGRect(arr),
size: context.height)
let lineOtwo = CGRect(origin:context.width,
size: context.minY + CGRect(space) * CGRect(arr))
line.append(lineOne)
}
return line
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment