I'm using CGContext in two steps: First create context, draw background image, draw with UIBezierPaths, then get the image & release the context. Secondly combine this image with another one like this:
UIGraphicsBeginImageContextWithOptions(self.anchorImage.size, NO, 1); [self.anchorImage drawInRect:CGRectMake(0, 0, self.anchorImage.size.width, self.anchorImage.size.height)]; [tempImage drawInRect:CGRectMake(0, 0, self.anchorImage.size.width, self.anchorImage.size.height)]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); This worked well in iOS4, however it's very very slow in iOS5 (I'm testing on a 3GS). Am I doing something wrong? Or is there a more optimal way of doing this? Or is there a specific iOS5 way of doing it?
UIBezierPaths?