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

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -