How to get diagram with images as a boarder line in iOS?
===

![enter image description here][1]


  [1]: http://i.stack.imgur.com/J0GoV.png

I drew rectangle diagram with boarder dotted blue line. I would like to rectangle diagram with same images as a boarder line. That means i want to replace dots with images 

My Code:

    - (void)drawRect:(CGRect)rect
    {
        context =UIGraphicsGetCurrentContext();
        CGContextSetRGBStrokeColor(context, 0.0, 0.0, 1.0, 1.0);
        
        CGFloat dashPattern[10] = {3.0, 2.0};
        CGContextSetLineDash(context, 0, dashPattern, 2);
        CGContextSetRGBFillColor(context, 0.0, 1.0, 0.0, 1.0);
       
        CGContextSetLineWidth(context, 10.0);
        CGContextAddRect(context, self.bounds);
        CGContextDrawPath(context, kCGPathFillStroke);
        CGContextClosePath(context);
        CGContextStrokePath(context);
    }

Can i set image instead of dots? Please give any suggestions to me. Thanks in advance.
