ios - how to resize image with CALayer -


i can resize image in uiimageview using code

uiimage *backgroundimage = [[uiimage imagenamed:@"background"] resizableimagewithcapinsets:uiedgeinsetsmake(10, 10, 10, 10)]; 

in order render image in layer, use following code didn't work

uiimage *backgroundimage = [[uiimage imagenamed:@"background"] resizableimagewithcapinsets:uiedgeinsetsmake(10, 10, 10, 10)]; calayer *layer = (id)backgroundimage.cgimage; 

the image isn't resized expected, how resize correctly?


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -