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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:19:34+00:00 2026-06-15T11:19:34+00:00

I am using an UIScrollView in my application, my requirement is I have to

  • 0

I am using an UIScrollView in my application, my requirement is I have to add background color to the UIScrollView but when user drags at the extreme top or at the extreme bottom the area other than the content/out side the content which shows in the scroll view should be shown with different color just like in UIWebView. In web view if we drag down at the top or drap up at the bottom it will show default background image/gray color and the web view content background color is diff(default white).Can anyone help me in achieving this.

thank you.

  • 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-15T11:19:36+00:00Added an answer on June 15, 2026 at 11:19 am

    The trick is to add subviews to the ScrollView that sit above and below the content. This way, they only appear when the content is dragged up or down.

    UIScrollView *scroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
    
    UIView *topView = [[UIView alloc] initWithFrame:CGRectMake(0, -200, scroll.bounds.size.width, 200)];
    [topView setBackgroundColor:[UIColor darkGrayColor]];
    [scroll addSubview:topView];
    [topView release];
    
    UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, scroll.bounds.size.height, scroll.bounds.size.width, 200)];
    [bottomView setBackgroundColor:[UIColor darkGrayColor]];
    [scroll addSubview:bottomView];
    [bottomView release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have added a UIScrollVIew using IB. Then using the following code i add
I'm using a UIScrollView to display a custom UIView . When the user drags
I have a UIScrollView and I add 9 imageview to it using the following
I am working in iPhone application, Using UIScrollView to set in Horizontal, add 5
I am working on an application in which I am using UIScrollview , in
I have to display images from the Photo Library using UIScrollview. Except the first
I have a UIScrollView which I create and size dynamically using... scrollView.contentSize = CGSizeMake(scrollView.frame.size.width
I have a subclass of UIScrollView that I'm using for images slideshow, with infinite
Any clues why my programmatically defined UIScrollView (using the application frame) always leaves an
I have an application that uses a UIScrollView to page between a number of

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.