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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:48:15+00:00 2026-06-03T01:48:15+00:00

I have a scroll view which is populating with views successfully however it isnt

  • 0

I have a scroll view which is populating with views successfully however it isnt scrolling, can anyone see why?

   CGRect fullScreenRect=[[UIScreen mainScreen] applicationFrame];

    UIScrollView *scrollView=[[UIScrollView alloc] initWithFrame:fullScreenRect];

    [scrollView setContentSize:self.view.frame.size];

    if (sqlite3_open(dbpath, &xxx) == SQLITE_OK)
    {
// code that works        
        if (sqlite3_prepare_v2(xxx, query_stmt, -1, &statement, NULL) == SQLITE_OK)
        {
            while (sqlite3_step(statement) == SQLITE_ROW)
            {
//more code that works                
                //add image view to view
                [scrollView addSubview:myImageView];

                i = i + 1;
            } 
            sqlite3_finalize(statement);
        }
        sqlite3_close(xxx);
    }

    self.view=scrollView;
  • 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-03T01:48:19+00:00Added an answer on June 3, 2026 at 1:48 am

    In order to make scrollview scrollable you need to set its contentSize property to be able to contain all your contents (and so most likely larger than scrollview frame). For example in case you want to scroll your views horizontally you’ll need to set contentSize width to a multiple of the number of your image views:

    ...
    // Loaded data and created subviews
    // Now set contentSize
    [scrollView setContentSize:CGSizeMake(imageWidth*numberOfImages, self.view.frame.size.height)];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a scroll view which holds a number of smaller views. I just
I have a scroll view which switches between two views. The two views are
I have a scroll view app which runs fine on the simulator, however, when
I have a table view controller which doesn't let me manually scroll to the
I have an scroll view with some sophisticated animations happening during scrolling. Although after
i have a scroll view which represents a map, it has pins on it,
I have a scroll view which has one UIView inside which contains the content.
So, i have a view controller which contains just a scroll view. In viewDidLoad,
I have a Scroll View, Table View, and textfield at the bottom which will
I have a view controller which contains a scroll view. Inside the scroll view

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.