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 8259457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:52:08+00:00 2026-06-08T02:52:08+00:00

I have a universal app, the code is the same. I have a UIScrollView

  • 0

I have a universal app, the code is the same. I have a UIScrollView in which has the scrollToTop working on the iPad but not on iPhone. I am pretty frustrated by this.

I know there’s a similar thread posted here, but that is not the case. I used to have the scrolling to work before this both on the iPad and iPhone. Any idea what to look for?

The structure of the code is like this. I have a mainVC called A. I then have a VC called B. There is also another VC called C, which has a UIScrollView. I added C as B’s child view controller. and then B as A’s child VC. Now the scroll view on C did not have the scrollToTop working.

The delegate scrollViewShouldScrollToTop is also called only in the iPad, not in the iPhone.

  • 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-06-08T02:52:10+00:00Added an answer on June 8, 2026 at 2:52 am

    Take a look at my answer to the question you’ve talked about. I’ve just added it a moment ago.

    EDIT

    I don’t have the original code I’ve made, but it should be like that:

    -(void)cleanUp:(UIScrollView*)view{
        if([view isKindOfClass:[UIScrollView class]]){
            view.scrollsToTop = NO;
        }else{
            for(UIScrollView* subview in view.subviews){
                if([subview isKindOfClass:[UIView class]]){
                    [self cleanUp:subview];
                }
            }
        }
    }
    

    and you can call it like this:

    [self cleanUp:self.view];
    

    You may also need even more tough variant of that routine (sometimes you may have a tableView inside a scrollView or something like that):

    -(void)cleanUp:(UIScrollView*)view{
        if([view isKindOfClass:[UIScrollView class]]){
            view.scrollsToTop = NO;
        }
        for(UIScrollView* subview in view.subviews){
            if([subview isKindOfClass:[UIView class]]){
                [self cleanUp:subview];
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Universal app (iPhone/iPad) which has an iAd displayed at the bottom
I have a Universal app (iPhone/iPad) testing on IOS4.3. It has an iAd which
I have a universal data type, which is passed by value, but does not
Hi all Working on a universal build for an iphone/ipod/ipad app. I was trying
I have a Universal App in which I customize my UINavigationBar. In my iPhone
If I have a universal app (runs on both iPhone & iPad), how do
I have an iPhone app I am working on to make universal for iPhone
I have the following code for my universal app but I'm getting this weird
I have written a universal iOS-App that runs fine on my iPhone and iPad,
I have just made my app universal by combining separate iPhone and iPad projects.

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.