简体   繁体   中英

how to use tap gesture in pageBased application for other functionality by not using for swiping of pages

I am using a page based application for one of my apps.In this there is scenario where if v tap once it swipes to next page.

What my requirement is i dont want this tap gesture for swiping of pages,instead i want this tap gesture to be used for some other functionality like once tap it shd zoom in or else if i tap some other tab bar should appear..

I know we can remove this tap gesture in viewdidload method by code.But i dont want to remove this gesture instead i want to use this Tap gesture for other functionality for example like zoomin and so on.So anyone tel me is this possible????If it is possible how can be achieve it???can anyone tel me by code???If its not possible then what are the other alternative????

I think you can implement something like this:

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
    UITouch *touch = [touches anyObject];
        if ([touch tapCount] == 2) {
            //your code here
        }
    //other code
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM