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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:01:16+00:00 2026-05-23T00:01:16+00:00

In iPhone application I want to generate a image of UIScrollView whose content size

  • 0

In iPhone application I want to generate a image of UIScrollView whose content size is near about 600*41000. If I use current graphic image context to capture the scroll view layer, then it only captures the visible part of the scroll view not the whole layer of that scroll view.

I am using the below code:

{
    UIGraphicsBeginImageContext(CGSizeMake(600, 4100));
    [scrollView.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();



    UIImageView *img = [[UIImageView alloc]initWithFrame:CGRectMake(00, 100, 710, 4100)];
    img.image = viewImage;
    [anotherScrollView addSubview:img];
}
  • 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-23T00:01:16+00:00Added an answer on May 23, 2026 at 12:01 am

    Try to generate image not from UIScrollView but from its content view. When you add some views to UIScrollView with something like addSubview: they become scroll’s content ones. Of course, UIScrollView can have more than one content view (just as any UIView can have more than one subview) and this case it will be more difficult to render its layer. But in case of only one subview (content view) you can use something like (contentView here is just some view, added to UIScrollView before):

    [contentView.layer renderInContext:UIGraphicsGetCurrentContext()];

    or:

    [[[[scrollView subviews] lastObject] layer] renderInContext:UIGraphicsGetCurrentContext()];

    When you want to use more than one view, it will be easier (I think) to add one more “root” view and add others as that view’s subviews: so you can also use the code above.

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

Sidebar

Related Questions

I want to build iPhone application for non-english language and I have read about
how to show Iframe on iphone application i want to simply make sql base
I Have UISlider in my iphone application and i want to call method (function
i simply want to make an iphone application with a remote database. For exemple
I want to parse HTML for my iPhone application. any tuts would help thanks
I want a hyperlink in my iPhone Application, for example like in HTML: <a
I want to create an iPhone application that can call web services on a
I am having big problems since I downloaded the beta version of iPhone SDK
So, yes, this is probably 1000th question on the subject. However, my question is
Hi All I wont to ask one more question !!! I search through internet

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.