draw an image based on one image iOS Objective c

Solution:

The below function is used for draw an image with reference image inside one rect.
Call the function using below code.

Call:

[self draw];

Function:


-(void) draw {
    
    CGContextRef cont = UIGraphicsGetCurrentContext();
    
    UIImage *_originalImg = [UIImage imageNamed: @"drawing_img"];
    [_originalImg drawInRect:CGRectMake(0.f, 0.f, _originalImg.size.width, _originalImg.size.height)];
    
    }

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift