title: How to stroke the dotted lines using cgcontext iOS?
body: <p>I have drawn the path using cgpoints but the path is full of dotted lines.I want to stroke the dashed line.</p>
  
  <p>My code:</p>
  
  <pre><code>CGPoint Point1=CGPointMake(184.9489, 383.4082);
  CGPoint Point2=CGPointMake(184.9489, 383.4082);
  CGPoint Point3=CGPointMake(184.2969, 377.911);
  CGPoint Point4=CGPointMake(184.2969, 377.911);
  CGPoint Point5=CGPointMake(184.2443, 372.978);
  CGPoint Point6=CGPointMake(184.2443, 372.978);
  NSArray *arry1=[NSArray arrayWithObjects:[NSNumber numberWithFloat:Point1.x],[NSNumber numberWithFloat:Point3.x],[NSNumber numberWithFloat:Point5.x],nil];
  NSArray *arry2=[NSArray arrayWithObjects:[NSNumber numberWithFloat:Point1.y],[NSNumber numberWithFloat:Point3.y],[NSNumber numberWithFloat:Point5.y],nil];
  NSArray *arry3=[NSArray arrayWithObjects:[NSNumber numberWithFloat:Point2.x],[NSNumber numberWithFloat:Point4.x],[NSNumber numberWithFloat:Point6.x],nil];
  NSArray *arry4=[NSArray arrayWithObjects:[NSNumber numberWithFloat:Point2.y],[NSNumber numberWithFloat:Point4.y],[NSNumber numberWithFloat:Point6.y],nil];
  for(int i=0;i&lt;[arry2 count];i++)
  {
      UIGraphicsBeginImageContext(self.view.frame.size);
      [img_View.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
      CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 3 );
      CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
      CGContextSetStrokeColorWithColor(UIGraphicsGetCurrentContext(),
                                       [UIColor blueColor].CGColor);
      CGContextMoveToPoint(UIGraphicsGetCurrentContext(), [[arry1 objectAtIndex:i]floatValue], [[arry2 objectAtIndex:i]floatValue]);
      CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), [[arry3 objectAtIndex:i]floatValue], [[arry4 objectAtIndex:i]floatValue]);
      CGContextSetBlendMode(UIGraphicsGetCurrentContext(),kCGBlendModeColor);
      CGContextDrawPath(UIGraphicsGetCurrentContext(), kCGPathFillStroke);
      CGContextStrokePath(UIGraphicsGetCurrentContext());
      img_View.image = UIGraphicsGetImageFromCurrentImageContext();
      [img_View setAlpha:1];
      UIGraphicsEndImageContext();}
  </code></pre>
  
  <p>the o/p is:(vertically 3 dots).
  the expected result:combining those three points.
  Can anyone please provide me some information regarding this?
  Thanks in advance.</p>