Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5992783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:34:55+00:00 2026-05-22T23:34:55+00:00

here is my problem: In mainviewcontroller I added to swipe down gesture to switch

  • 0

here is my problem: In mainviewcontroller I added to swipe down gesture to switch down another view, but inside other views added to mainviewcontroller with swipe down gesture opens that specific view. However, I dont want swipe down gesture in other views rather than main view.

//---gesture recognizer

- (IBAction) handleSwipes:(UIGestureRecognizer *) sender {
    UISwipeGestureRecognizerDirection direction = [(UISwipeGestureRecognizer *) sender direction];

    if (direction == UISwipeGestureRecognizerDirectionDown) {
        shakeController = [[ShakeViewController alloc] 
                           initWithNibName:@"ShakeViewController" bundle:nil];

        CATransition *transition = [CATransition animation];
        transition.duration = 0.5;

        transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];

        transition.type = kCATransitionMoveIn;
        transition.subtype = kCATransitionFromBottom;

        transition.delegate = self;

        // Next add it to the containerView's layer. This will perform the transition based on how we change its contents.
        [self.view.layer addAnimation:transition forKey:nil];

        [self.view addSubview:shakeController.view];

    }
}

- (void)viewDidLoad {
    [super viewDidLoad];

    //gesture recognizer
    UISwipeGestureRecognizer *swipeGesture = [[UISwipeGestureRecognizer alloc]
                                              initWithTarget:self
                                              action:@selector(handleSwipes:)];
    swipeGesture.direction = UISwipeGestureRecognizerDirectionDown;
    [self.view addGestureRecognizer:swipeGesture];

    [swipeGesture release];
}

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:34:55+00:00Added an answer on May 22, 2026 at 11:34 pm

    You should adopt the UIGestureRecognizerDelegate protocol and implement gestureRecognizer:shouldReceiveTouch: method to signal whether the gesture recognizer should respond or not.

    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
        for ( UIView *subview in self.view.subviews ) {
            CGPoint point = [touch locationInView:subview];
            UIView *hitView = [subview hitTest:point withEvent:nil];
            if ( hitView != nil ) {
                return NO; // Touching one of the subviews so we will not accept the gesture.
            }
        }
        return YES;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem here. My Zend_Forms do not render in view script. Via
I'm trying to solve the problem here but I don't know why my code
Here the problem: the layer gets sucessfully hidden, but when I click the button
I use shake gesture for my application but i have problem! My application is
I've looked over many code samples here and on other sites but I couldn't
I have a mainViewController and inside its nib file I added an info button,
Maddening problem here. When my page loads: <body onload=getClientDateTime();> It runs this function: document.getElementById('ClientDateTime').value=hello
What is the problem here? (Besides having redundant code). $.getJSON works as expected. However
I've got a problem here with an MSI deployment that I'm working on (using
Just a small SVN problem here. I setup my own SVN server Setting up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.