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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:46:48+00:00 2026-05-20T18:46:48+00:00

I am an new user of Objective-c. I have a problem to load imageview

  • 0

I am an new user of Objective-c. I have a problem to load imageview to scrollview.

I use interface builder to add a scrollview onto view. and then I try to add an imageview on the scrollview by code.

UIImage *image = [[[UIImage alloc]init]autorelease];
image = [UIIamge imageNamed:@”cover.jpg”];

imageView = [[[UIImageView alloc]init]autorelease];
imageVIew.frame = CGRectMake(50.0, 40.0, 200.0,200.0);
imageView.image = image;

[scorllView addSubview:imageView];

then I add another imageView onto the ScrollView with position at (50.0,1000.0)
and length = 200, width = 200 (the screen of ipad is 786*1004)
the photos can appear on the screen. The second photo is not complete, and I try to scroll the screen, however I can’t scroll it.

Thanks.

  • 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-20T18:46:48+00:00Added an answer on May 20, 2026 at 6:46 pm

    first, you only need

    UIImage * image = [UIImage imageNamed:@”cover.jpg”];
    class methods(imageNamed: here) that creates the instance of it other than “alloc” would create a autoreleased object.

    [UIImage imageNamed:@”cover.jpg”]
    is conceptually identical to
    [[UIImage alloc] initWithFileContents:@”cover.jpg”] autorelease] // note, alloc once, release once.
    (it may not be identical internally, imageNamed: caches the image initWithFileContents: might not)

    In order to scroll the scrollView,
    there are many things you need to make sure.

    One of it is to make sure your scrollView’s contentSize is bigger than your scrollView’s frame size.
    try setting your scrollView.contentSize = CGSizeMake(someBigValue, someBigValue);

    The content inside scrollView scrolls inside the scrollView. So your content should be bigger than scrollView’s frame size to scroll.

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

Sidebar

Related Questions

To create a new user I use a search view to find user info
I am a new user in Git world. I used to use Subversion (using
I need add a new user group for mediawiki. The new group has more
Hello I am a new user to Python and I am having problem doing
I am new to objective-c and i have created a application in which there
I'm new to Objective C and have a pretty basic question. So I have
I am new to objective C and am having a problem with the following
I am new to iPhone programming and Objective-C. I am building a View-based application.
I am a new user to git and I am starting a new project.
How can create a New user in ORACLE with full access (alter, delete, select,

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.