Fill blank space of the circle in CVCalendar

1

I have a question, I used the CVCalendar library and the days that have events are marked with a blue circle around it. What I want is to fill that circle and not leave it blank. I leave an Image of what I need to get. In number 5 is how I need to get it and number 19 is how it is now.

I leave the code here

func supplementaryView(viewOnDayView dayView: DayView) -> UIView {
    let π = M_PI

    let ringSpacing: CGFloat = 3.0
    let ringInsetWidth: CGFloat = 1.0
    let ringVerticalOffset: CGFloat = 1.0
    var ringLayer: CAShapeLayer!
    let ringLineWidth: CGFloat = 4.0
    let ringLineColour: UIColor = .blueColor()

    let newView = UIView(frame: dayView.bounds)

    let diameter: CGFloat = (newView.bounds.width) - ringSpacing
    let radius: CGFloat = diameter / 2.0

    let rect = CGRectMake(newView.frame.midX-radius, newView.frame.midY-radius-ringVerticalOffset, diameter, diameter)

    ringLayer = CAShapeLayer()
    newView.layer.addSublayer(ringLayer)

    ringLayer.fillColor = nil
    ringLayer.lineWidth = ringLineWidth
    ringLayer.strokeColor = ringLineColour.CGColor

    let ringLineWidthInset: CGFloat = CGFloat(ringLineWidth/2.0) + ringInsetWidth
    let ringRect: CGRect = CGRectInset(rect, ringLineWidthInset, ringLineWidthInset)
    let centrePoint: CGPoint = CGPointMake(ringRect.midX, ringRect.midY)
    let startAngle: CGFloat = CGFloat(-π/2.0)
    let endAngle: CGFloat = CGFloat(π * 2.0) + startAngle
    let ringPath: UIBezierPath = UIBezierPath(arcCenter: centrePoint, radius: ringRect.width/2.0, startAngle: startAngle, endAngle: endAngle, clockwise: true)

    ringLayer.path = ringPath.CGPath
    ringLayer.frame = newView.layer.bounds

    return newView
}
    
asked by Bogdan 11.02.2016 в 18:59
source

0 answers