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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:38:13+00:00 2026-06-05T03:38:13+00:00

I have an application like the photos app where the main view is a

  • 0

I have an application like the photos app where the main view is a UIScrollView which takes up the full size of the screen. Also, like the photos app, when the user taps the screen there are translucent navigation, status, and tool bars which reappear / disappear.

I am having a problem setting the UIViewControllers main view as a UIScrollView and having it take up the full length of the screen. The problem is that when the navigation and status bars are shown, the UIScrollView gets pushed down by the height of the navigation and status bars (it doesn’t go underneath them like it’s suppose to). When the user taps the screen and the navigation / status bars disappear, then it resets itself to take up the full length of the screen like it’s suppose to.

A simple work around of setting the main view as a UIView and attaching a UIScrollView on top of it works. However, I’d like to try and get this to work without any workarounds (ie adjusting the UIScrollViews contentInset, etc) because in theory it should work.

Below is the code I’m implementing:

- (void)loadView
{

    self.wantsFullScreenLayout = YES;

    UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame: CGRectMake(0,0,320,480)];
    scrollView.contentSize = CGSizeMake(320, 480);
    scrollView.scrollEnabled = NO;
    scrollView.contentOffset = CGPointZero;
    scrollView.bounces = NO;
    self.view = scrollView;
    [scrollView release];

}

- (void) viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];

    self.navigationController.navigationBar.translucent = YES;
    [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleBlackTranslucent animated: NO];
    self.navigationController.toolbarHidden = NO;
    self.navigationController.toolbar.barStyle = UIBarStyleBlack;
    self.navigationController.toolbar.translucent = YES;

    [self startTimer];
}

- (void) viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];

    self.navigationController.navigationBar.translucent = NO;
    [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleDefault animated: NO];

    [self cancelTimer];
}

UPDATE: I’ve noticed it’s the contentOffset and contentInset that are changing, not the scrollViews frame. When the bars have disappeared and the UIScrollView is the full size of the screen (as it should be), the contentOffset and contentInset are as follows:

Content Offset: {0, -20}
Content Inset: {20, 0, 44, 0}

When the bars are visible and the UIScrollView is pushed down, the contentOffset and contentInset are as follows:

Content Offset: {0, -64}
Content Inset: {64, 0, 44, 0}
  • 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-05T03:38:15+00:00Added an answer on June 5, 2026 at 3:38 am

    I spoke with DTS about this and they said this is the designed behavior and recommended to attach the UIScrollView to a parent UIView.

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

Sidebar

Related Questions

Hi I am trying to implement Photos.app like application, in which on the below
In my application, I would like to present the user with a full-screen photo
I have made an iphone application like flip cards in which values of cards
I have a tab-bar and navigation controller application (like Youtube app or Contacts app).
I have an iphone app which post photos into albums of facebook users, and
I am trying to create an application like Facebook in which each user can
We have a web application that allows users to upload photos which will then
I have a path like C:\application\photo\gallery\sketches . Now I need to check whether this
I would like to create a photo/video capture application. I have created a CaptureView
I have an application with like 400 records in the database, I have splash

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.