title: How to display dashed lines in objective-c?
body: <p>I have this code to display a grid with dashed line. In runtime on an iphone 5 below it shows fine, but if I run the app on iphone 5s there's no grid. I tested in iPhone Simulator and on real devices and happens the same.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>if (self.dashLongitude) {
      CGFloat lengths[] = {3.0, 3.0};
      CGContextSetLineDash(context, 0.0, lengths, 2);
  }
  
  //other stuff here
  
  CGContextSetLineDash(context, 0, nil, 0);
  </code></pre>
  
  <p>So anyone could help??</p>
  
  <p>EDIT: Hey guys I solved the issue using the same code I posted here, but in a different method. So I have now two methods: one just for the drawing the grid and another on to draw the line with data and finally got everything working.</p>