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

  • Home
  • SEARCH
  • 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 6866807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:13:52+00:00 2026-05-27T03:13:52+00:00

I have a UIViewController . Within that is a UITableView which is drawn at

  • 0

I have a UIViewController. Within that is a UITableView which is drawn at origin 0,0. I also have a UIScrollView that is drawn at 0,-80 so that it is off screen and not visible.

When a menu button is pressed, I animate the UIViewController‘s frame down 80px to reveal the UIScrollView.

The problem here is that the UIScrollView does not respond at all.

If I draw the UIScrollView at say 0,0, where it IS visible on load, it works fine. I can even animate it off screen then back on screen with no issue.


Here is how my view looks before animating:

 _____________________________
|                             |  Frame -> (0,-80, 320, 80)                  
|      ScrollView             |  **Offscreen**
|_____________________________|
|                             |  <- Original view (0,0,320,480)
|                             |
|                             |
|                             |
|                             |
|                             |
|       Original View         |
|                             |
|                             | 
|                             |
|                             |
|                             |
|                             |
|                             |
|                             |
|                             |
|                             |
|_____________________________|

When I animate I do the following:

[UIView animateWithDuration:0.3 
                      delay:0.0 
                    options:(UIViewAnimationOptionAllowUserInteraction |
                             UIViewAnimationOptionCurveEaseIn) 
                 animations:^{ 
                         self.view.frame = CGRectMake(0.0, (self.view.frame.origin.y + container.frame.size.height), self.view.frame.size.width, self.view.frame.size.height);
                        scroll.userInteractionEnabled = YES;
                     } 

                 completion:^(BOOL finished) { 
                         if (scrollLoaded == NO) {
                             [self loadFavorites]; 
                             scrollLoaded = YES;
                         }
                     }];

Now my view looks like this after animating:

 _____________________________
|                             |  Frame -> (0, -80, 320, 80)              
|      ScrollView             |  
|_____________________________|
|                             |  <- Original view (0, 80, 320, 480)
|                             |
|                             |
|                             |
|                             |
|                             |
|       Original View         |
|                             |
|                             | 
|                             |
|                             |
|                             |
|                             |
|                             |
|_____________________________|
|                             |
|        **Offscreen**        |
|_____________________________|

I have subclassed my scrollView to listen more closely for events:

.h

#import <UIKit/UIKit.h>

@interface UIScrollView_ExtraTouch : UIScrollView

@end

.m

#import "UIScrollView+ExtraTouch.h"

@implementation UIScrollView_ExtraTouch

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
    NSLog(@"scrollview touchesBegan");
    [self.nextResponder touchesBegan:touches withEvent:event];
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
    NSLog(@"scrollview touchesMoved");
    if(!self.dragging){
        [self.nextResponder touchesMoved:touches withEvent:event];
    }
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
    NSLog(@"scrollview touchesEnded");
    [self.nextResponder touchesEnded:touches withEvent:event];
}

@end

Nothing goes to the log after the animation. Which I think means that since the frame is at -80, it believes it to be off screen, thus not receive any type of action.

Is this correct? If so is there a way to fix it?

  • 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-27T03:13:52+00:00Added an answer on May 27, 2026 at 3:13 am

    The scroll view is outside of the original view so you cannot react with it. To fix create a wrapper view that is large enough to contain the whole content area(with scrollView & tableView both as subViews), add it to the original view, and animate this wrapper view instead of original view.

    So wrapper view will be 320×560, and at 0,-80 in original view. Then move it up and down 80 as needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIViewController, which uses a UIScrollView and within that Scrollview it has
I have a UIViewController, and within that view i have UITableView added in IB
I have a UIViewController (which sits inside a tabUIController). Within this UIViewController, I want
I have a problem with data in UITableView. I have UIViewController, that contains UITableView
I have a UIScrollView that I need to subclass and within the subclass I
I have a UIViewController subclass which is having its view created programmatically within the
I have a RootViewController that is a UIViewController with a UITableView. This RootViewController pushes
(first UIViewController)I have several UITextfields that will have some number value within them. I
I have a custom view MyView : UIViewController <UITableViewDelegate, UITableViewDataSource> with a UITableView within
Within an application it's possible to have different UIViewController s that need to share

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.