Description:
When I conclude project 9 days three I found some problems.
We create a checkerBoard with four rows and four columns,then if the sum of the row number and column number can be perfectly divided by 2,we draw a rectangle.
let startX=columnsize*CGFloat(column)
let startY=rowsize*CGFloat(row)
let rect=CGRect(x: startX, y: startY, width: columnsize, height: rowsize)
mypath.addRect(rect)
But I have a new ideal,what should I do if I want draw a circle?
So,I try to do that by myself,and the following code is what I did,unfortunately,it doesn't work well:
let startX=columnsize*CGFloat(column)
let startY=rowsize*CGFloat(row)
//let rect=CGRect(x: startX, y: startY, width: columnsize, height: rowsize)
// mypath.addRect(rect)
mypath.addArc(center: CGPoint(x:startX+columnsize/2, y: startY+rowsize/2), radius: rowsize/4, startAngle: .degrees(0), endAngle: .degrees(360), clockwise: true)
The problem is that I just see only one circle on my screen,but it should be more actually.I guess the key is "mypath.addArc"just performs once,I think about it a lot and can't find a solution to solve it.
I am so sorry for taking your time to turn to you,but I do have no idea about it,so ,thanks again,sincerely.