objective c - Xcode, Not able to detect SwipeGesture after i add Animation on my ScrollView -


before start,

uiswipegesturerecognizer *seipeges=[[uiswipegesturerecognizer alloc]initwithtarget:self action:@selector(leftswipe:)];     seipeges.direction=uiswipegesturerecognizerdirectionleft;     [self.view addgesturerecognizer:seipeges];      uiswipegesturerecognizer *rightgesture=[[uiswipegesturerecognizer alloc]initwithtarget:self action:@selector(rightswipe:)];     rightgesture.direction=uiswipegesturerecognizerdirectionright;     [self.view addgesturerecognizer:rightgesture]; 

this swipe detect code run well. after add animation on uiscrollview.

[uiview animatewithduration:3.0f                       delay:0.0f                     options:uiviewanimationoptionrepeat | uiviewanimationoptionautoreverse                  animations:^{                      if(leftright==1)                          [imgcell.scrollview setcontentoffset:cgpointmake((-newoffsetx), 0)];                      else                          [imgcell.scrollview setcontentoffset:cgpointmake(0, 0)];                  }                  completion:^(bool finished){                  }]; 

the animation run also. if animation not yet start, uiswipegesturerecognizer still running well. found out, when animation start, not able detect uiswipegesturerecognizer more.

so 1 can tell me missing? or why swipegesture code not able run after animation start?

i post solution @ here.

try setting uiviewanimationoptionrepeat | uiviewanimationoptionautoreverse | uiviewanimationoptionallowuserinteraction option , see if works.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -