                     let point = touchPoint.locationInView(self)
                     //怎么找到上一个Point
                     let previousPoint = touchPoint.previousLocationInView(self)
-                    for var i=0;i<arrTraces?.count;i += 1
-                    {
+                    var i = 0
+                    while i < arrTraces?.count {
                         var tempTraces = arrTraces![i]
                         let lastPoint = tempTraces.arrPoints.last
                         if lastPoint == previousPoint

                    CGContextSetLineWidth(ctg, width)
                    CGContextStrokePath(ctg)
                }
            }
        }
        

        if arrTraces?.count > 0
        {
            CGContextBeginPath(ctg)
            var i = 0
            while i < arrTraces?.count {
                var tempTrace = arrTraces![i]
                if tempTrace.arrPoints.count > 0
                {
