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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:27:19+00:00 2026-06-18T09:27:19+00:00

Is it possible to have a small vertical scrollview as subview of another bigger

  • 0

Is it possible to have a small vertical scrollview as subview of another bigger vertical scrollview?

I made a small prototype. When the scrollviews are not hierarchical (if I put them side by side for example), both scroll correctly. But if I put one as a subview of the other, then only the sub scrollview scrolls when I pan it and the top scrollview seems to be locked when I pan it.

I envision that if the user pans the embedded scrollview (subSV in diagram below), then only the embedded scrollview would scroll. Similarly, if the user pans the top scrollview, then only the top scrollview would move and the embedded scrollview may be scrolled out of the visible content.

Do you know of any sample code that does this?

UIScrollView as content of another UIScrollView

  • 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-18T09:27:20+00:00Added an answer on June 18, 2026 at 9:27 am

    I was able to make it work with programmatically but not using StoryBoard. Here is the trivial piece of code:

    UIScrollView *topSV = [[UIScrollView alloc] initWithFrame:CGRectMake(100.0f, 100.0f, 600.0f, 600.0f)];
    topSV.backgroundColor = [UIColor scrollViewTexturedBackgroundColor];
    topSV.contentSize = CGSizeMake(2000.0f, 2000.0f);
    
    UIScrollView *subSV = [[UIScrollView alloc] initWithFrame:CGRectMake(10.0f, 10.0f, 200.0f, 200.0f)];
    subSV.backgroundColor = [UIColor whiteColor];
    subSV.contentSize = CGSizeMake(2000.0f, 2000.0f);
    
    [topSV addSubview:subSV];
    
    [self.window addSubview:topSV];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am not sure if this is possible but I have a small web
Possible Duplicate: USD Currency Formatting in Java All- I have a small problem in
Possible Duplicate: String comparison and String interning in Java I have small doubt regarding
Is it possible to filter out subsets of the data that have small numbers
Possible Duplicate: Floating point equality in python I have a small issue about my
I have a small problem where I need to find all possible paths given
Possible Duplicate: void * arithmetic Hi guys I have a small question regarding pointer
Possible Duplicate: click link below a higher z-index div I have a small question.
Possible Duplicate: Firefox body margin bug? I have previously gotten stuck with vertical padding
Possible Duplicate: Codeigniter global_xss_filtering I have small problem with inserting image source (HTML tag)

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.