objective c - UIView can't move after masking image -


i have uiview uiimage property. masking image , adding uiview. once have clipped mask image gestures no longer work.

masking code:

cgcontextref ctx = uigraphicsgetcurrentcontext(); ... // creating mask cgcontextclip(ctx); [self.image drawinrect:cgrectmake(0, 0, self.bounds.size.width, self.bounds.size.height)]; cgcontextdrawpath(ctx, kcgpathstroke); 

gesture code:

- (void)move:(uipangesturerecognizer*)gesture {       cgpoint translation = [gesture translationinview:self.superview];     cgrect currentframe = self.frame;      currentframe.origin.x = self.frame.origin.x + translation.x;     currentframe.origin.y = self.frame.origin.y + translation.y;     self.frame = currentframe;     [gesture settranslation:cgpointzero inview:self.superview]; } 

if remove line: cgcontextclip(ctx); gestures work fine. suggestions appreciated.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -