iOS/Objective C image alpha low when I goes out of bounds of parent image -


i have image editing ios app.

i have t-shirt(parent image) image background image , can add other image(sub images) t-shirt image.

when scale, move, rotate sub images meanwhile if portion of image going out of bounds of parent image portion should low alpha value.

similarly i’ve shown in screenshot.

here screenshot

i’ve wrote following code.

uiimageview* randomview = [[uiimageview alloc] initwithframe:self.imageview.bounds];      randomview.userinteractionenabled = yes;     randomview.alpha = 0.8;     randomview.image = image; // 'image' coming gallery or camera      uiimageview *maskview = [[uiimageview alloc] initwithimage:self.imageview.image];     [maskview setframe:self.imageview.bounds];     self.imageview.layer.mask = maskview.layer;     [self.imageview setneedsdisplay]; 

add 1 more imageview (copy of main image alpha) behind t-shirt view.


Comments

Popular posts from this blog

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -