UISwipeGestureRecognizer In Objective C
UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)];
UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)];
// Setting the swipe direction.
[swipeLeft setDirection:UISwipeGestureRecognizerDirectionLeft];
[swipeRight setDirection:UISwipeGestureRecognizerDirectionRight];
// Adding the swipe gesture on image view
[self.view addGestureRecognizer:swipeLeft];
[self.view addGestureRecognizer:swipeRight];
//Add this Delegate Method...
- (void)handleSwipe:(UISwipeGestureRecognizer *)swipe
{
if (swipe.direction == UISwipeGestureRecognizerDirectionLeft)
{
}
if (swipe.direction == UISwipeGestureRecognizerDirectionRight)
{
}
}
Thanks a lot for your help on this blog. I look forward to reading more articles from you!
ReplyDeleteAppium Training in Chennai
Best Appium Training institute in Chennai
Mobile Appium Course
JMeter Training Institute in Chennai
JMeter Training in Chennai
core java training in chennai
C C++ Training in Chennai
javascript training in chennai
I would definitely thank the admin of this blog for sharing this information with us. Waiting for more updates from this blog admin.
ReplyDeleteccna Training center in Chennai
Best CCNA Training Institute in Chennai
ReactJS course
Ethical Hacking Course in Chennai
Best PHP training in chennai
gst classes in chennai
ccna Course in Chennai
web designing training in chennai
I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective. Techno-based information has been fetched in each of your topics. Sure it will enhance and fill the queries of the public needs good luck
ReplyDeleteAi & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai