I wrote this line:
NSTimer.scheduledTimerWithTimeInterval(0.5, target: self, selector: "showGallery:", userInfo: nil, repeats: false)
So, it runs when my 0.5 seconds are expired. But I want to run those function if there are difference between seconds is less than 0.5.
For example: I touch the screen and do not release it 1 second. Then it do not need to run my func, but if I touched and released quickly, then it must run.
How can I modify my function?