I have this code
CGPoint one = [button center];
CGPoint two = [button center];
How draw a line at this points? thanks
I try this
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextMoveToPoint(ctx, one.x, one.y);
CGContextAddLineToPoint(ctx, two.x, two.y);
CGContextStrokePath(ctx);
But i have this error:
<Error>: CGContextDrawPath: invalid context 0x0