I am trying to draw a transparent rectangle in my UIView which has a black border.
My code however creates a completely black rectangle. Here\'s my code so far:
One handy tip ......
Very often, when you need to draw a square
it's easier to just draw a 'thick stripe' .....
let context = UIGraphicsGetCurrentContext()
context!.setLineWidth(100)
context!.setStrokeColor(blah.cgColor)
context?.move(to: CGPoint(x: 500, y: 200))
context?.addLine(to: CGPoint(x: 500, y: 300))
context!.strokePath()
That will draw a square, which runs downwards from 200 to 300.
It's centered on 500 across, and is 100 wide.