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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:53:00+00:00 2026-06-11T20:53:00+00:00

I am attempting to create a metro styled UIScrollView. It is similar to how

  • 0

I am attempting to create a “metro” styled UIScrollView. It is similar to how iTunes app handles panels in the new ios version which wont be named.

I can’t figure out how to have my views layout/scroll so that the next view in the sequence shows up. I’ve tried all sorts of things like keeping the contentSize the screen width but moving each view over -10ish so it will show up like above. I’ve tried making scrollView whose bounds were smaller than the screen so it would show the part of the next view. Nothing works.

Here is diagram of what I’m trying to do:
enter image description here

It seems extremely trivial on paper but I can’t seem to get it work.

  • 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-11T20:53:01+00:00Added an answer on June 11, 2026 at 8:53 pm

    I’m not sure if I’m misinterpreting your requirements – but this might be a starting point to see how you could set it up:

    - (void)viewDidLoad
    {
      [super viewDidLoad];
    
      CGRect viewBounds      = self.view.bounds;
      CGRect scrollViewFrame = CGRectMake(0, 0, floorf(CGRectGetWidth(viewBounds) / 2.2), CGRectGetHeight(viewBounds));
      UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:scrollViewFrame];
    
      scrollView.center        = self.view.center;
      scrollView.contentSize   = CGSizeMake(CGRectGetWidth(viewBounds) * 3, CGRectGetHeight(viewBounds) * 3);
      scrollView.pagingEnabled = YES;
      scrollView.clipsToBounds = NO;
    
      UIPanGestureRecognizer *gestureRecognizer = scrollView.panGestureRecognizer;
      [self.view addGestureRecognizer:gestureRecognizer];
    
      for (int i = 0; i < 3; i++) {
        CGRect frame = CGRectMake(10.f + (i * CGRectGetWidth(scrollView.bounds)), 10.f, CGRectGetWidth(scrollView.bounds) - 20.f, (CGRectGetHeight(scrollViewFrame) * 3) - 20.f);
        UIView *view = [[UIView alloc] initWithFrame:frame];
        view.backgroundColor = [UIColor redColor];
        [scrollView addSubview:view];
      }
    
      [self.view addSubview:scrollView];
    }
    

    Literally just put this in an empty viewController’s viewDidLoad:

    The key things to note are

    • contentSize needs to be wide enough for all the panels
    • clipsToBounds should be NO so you can see the additional views
    • The bounds of the scrollview is essentially the main view port
    • pagingEnabled should be set
    • I’ve grabbed the panGestureRecognizer from the scrollview and attached it to the containing view instead so that panning is detected in the bounds of the containing view (which is larger) otherwise you are restricted to only detecting scrolls within the scrollviews bounds
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im attempting to create a new operator :? on lists, which operates the same
When attempting to create a new Ruby on Rails app in Windows the command
I'm attempting to create a new iPad project for an app I'm working on,
I'm attempting to create a CustomControl which will have various properties affected by an
i'm attempting to create an header which is divided into 3 divs they will
What I'm attempting to create is very similar to the Toolbox in VS 2008
I'm attempting to create a method in Haskell which I would think is very
I'm attempting to create a new forum on an existing forum. I can create
I'm attempting to create thumbnails out of some images, each of which isn't necessarily
I'm attempting to create a small application in which I can make a poul

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.