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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:44:30+00:00 2026-05-28T14:44:30+00:00

In Xcode 3, I followed a tutorial on UIScrollView that told me to set

  • 0

In Xcode 3, I followed a tutorial on UIScrollView that told me to set the size of my View to be 320×650, and then drag a ScrollView on top of that View. After adding:

[scrollView isScrollEnabled:YES];
[scrollView setContentSize:CGMakeSize(320, 650)];

in the viewDidLoad, and after attaching all the outlets properly, everything worked, I was able to see the scroll bars when I tried moving the screen up and down.

However, when I tried the same tutorial in Xcode 4.2, it didn’t work, ie. I couldn’t scroll the view. It appears that I need to set the content size to be larger than the size of the ScrollView.

Is this something that changed in XCode 4.2, or was the original tutorial wrong?

Should the size of the scrollView always be 320×480? I no longer understand the semantics of what this all means now, ie. why I need to setContentSize of the scrollView, but also set the size of the scrollView in Interface Builder. When I initially drag the scrollView on top of a View, it comes out the same size as the View. Is this wrong?

  • 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-28T14:44:32+00:00Added an answer on May 28, 2026 at 2:44 pm

    For a UIScrollView, the contentSize is generally going to be larger than the frame size of the UIScrollView. The point of setting contentSize is to tell UIScrollView how large its scrollable area is. When the user drags the content around, the UIScrollView will know how far it can drag it left or right or up or down.

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

Sidebar

Related Questions

I'm building an ogre3d tutorial based on this setup http://www.ogre3d.org/wiki/index.php/SettingUpAnApplication#XCode I've followed all steps
I have followed the tutorial at http://blog.boreal-kiss.net/2011/03/15/how-to-create-universal-static-libraries-on-xcode-4/ To make myself a static library. It
I've followed this link: How to set up an SCM in Xcode? However when
I have installed Google Toolbox for Mac into Xcode and followed the instructions to
I followed this tutorial and I'm currently trying to create a class to draw
I've followed this tutorial for setting up a static library with common classes from
I am using MacOSX 10.6, and the Xcode simulator is 4.2, but after trying
I've followed the tutorial below, it basically just tells you to create a button
my first question sorry if this is too basic. I followed the tutorial Beginning
Since upgrading to Xcode 3.2.1, I've experienced a strange issue that has really killed

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.