save touch X,Y to a var on touch start, and check distance from current touch X,Y on touch end, if it's greater than X (try different offsets) then it's a swipe, else it's a click.
You might also want to add a timer that counts while touching, so if you release the touch after a long time, maybe it's better to consider it a click and not a swipe.