uiscrollview - iOS scroll view childs are not getting touched -
i'm new ios i'm getting problem scroll view. scroll view having image views subviews. whenever i'm trying touch image inside scroll view, scroll view touch getting enable instead of subview. how resolve problem? thanks
add tap gesture recognizer scroll view enabling touch inside scroll view:
uitapgesturerecognizer *singltap = [[uitapgesturerecognizer alloc] initwithtarget:self action:@selector(methodname:)]; singltap.cancelstouchesinview = no; [scrollviewname addgesturerecognizer:singltap];
then write code in specified method.
-(void)methodname:(uitapgesturerecognizer *)gesture { //your code here }
thats all
Comments
Post a Comment