 
 import UIKit
 
-class ViewController2: UIViewController {
+final class ViewController2: UIViewController {
     
     private var backgroundRect = UIView()
     private var outerCircle = CAShapeLayer()

        let mPath = UIBezierPath(arcCenter: CGPointMake(CGRectGetMidX(backgroundRect.bounds), CGRectGetMidY(backgroundRect.bounds)), radius: 30.0, startAngle: 0, endAngle: CGFloat(M_PI) / 180 * 3.6 * multiplier, clockwise: true)
        let iPath = UIBezierPath(arcCenter: CGPointMake(CGRectGetMidX(backgroundRect.bounds), CGRectGetMidY(backgroundRect.bounds)), radius: 20.0, startAngle: 0, endAngle: CGFloat(M_PI) / 180 * 3.6 * multiplier, clockwise: true)
        
//        dispatch_async(dispatch_get_main_queue(), { () -> Void in
//            CATransaction.begin()
//            CATransaction.setAnimationDuration(0.5)
        
            self.outerCircle.path = oPath.CGPath
            self.middleCircle.path = mPath.CGPath
            self.innerCircle.path = iPath.CGPath
//            CATransaction.commit()
//        })
    }
    
}

        CATransaction.commit()
        
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(0.8 * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), { () -> Void in
            self.showFailmark()
        })
    }
    
    func showCheckmark() {
        let group = CGRectMake(CGRectGetMinX(backgroundRect.bounds), CGRectGetMinY(backgroundRect.bounds), CGRectGetWidth(backgroundRect.bounds), CGRectGetHeight(backgroundRect.bounds));
        let checkmark = UIBezierPath()
        checkmark.moveToPoint(CGPointMake(CGRectGetMidX(group) - 27, CGRectGetMidY(group)))
        checkmark.addLineToPoint(CGPointMake(CGRectGetMidX(group) - 2, CGRectGetMidY(group) + 25))
        checkmark.addLineToPoint(CGPointMake(CGRectGetMidX(group) + 33, CGRectGetMidY(group) - 30))
        checkmark.lineCapStyle = .Round
        
        let checkmarkShape = CAShapeLayer()
        checkmarkShape.path = checkmark.CGPath
        checkmarkShape.strokeColor = UIColor.gs_colorWithRGB(82.0, green: 124.0, blue: 194.0, alpha: 1.0).CGColor
        checkmarkShape.fillColor = UIColor.clearColor().CGColor
        checkmarkShape.lineWidth = 2.0
        checkmarkShape.lineCap = kCALineCapRound
        checkmarkShape.rasterizationScale = UIScreen.mainScreen().scale
        backgroundRect.layer.addSublayer(checkmarkShape)
        
