I have next code which is called every time user touches the screen and modifies the UIBezierPath
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextDrawImage(context, self.bounds, image);
[lineColor setStroke];
[currentPath stroke];
if(panEnded)
{
if(image!=nil)
{
CFRelease(image);
}
image=nil;
image=CGBitmapContextCreateImage(context);
panEnded=false;
}
so every time i create new image (from "if" branch) it rotates 180 degrees. what am i doing wrong?