I have to admit that I have no idea how to do this in iOS -
Here is the code that makes a beautiful dashed line:

Now I want this line to “run” up:
So, every second it will move up itemLength * 2.0.
Of course, it will flow from top to bottom.
So, DottedVerticalyou just have to do it completely on your own.
Really, how do you do it in iOS?
It would be great if the solution would be general and would “scroll through” everything that I suppose, a layer or a drawn thing.
They say that in the game engine this is trivial, you just animate the texture offset. Can you shift a layer or something in iOS?
What is the best way?
, ( ?), .
@IBDesignable class DottedVertical: UIView {
@IBInspectable var dotColor: UIColor = UIColor.faveColor
override func draw(_ rect: CGRect) {
let totalCount = 8 + 8 - 1
let fullHeight = bounds.size.height
let width = bounds.size.width
let itemLength = fullHeight / CGFloat(totalCount)
let beginFromTop = !lowerHalfOnly ? 0.0 : (fullHeight * 8.0 / 15.0)
let top = CGPoint(x: width/2, y: beginFromTop)
let bottom = CGPoint(x: width/2, y: fullHeight)
let path = UIBezierPath()
path.move(to: top)
path.addLine(to: bottom)
path.lineWidth = width
let dashes: [CGFloat] = [itemLength, itemLength]
path.setLineDash(dashes, count: dashes.count, phase: 0)
dotColor.setStroke()
path.stroke()
}
( - , , . "" , , .)