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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:20:21+00:00 2026-06-11T03:20:21+00:00

I am thinking of creating UIView classes and adding all views to single horizontal

  • 0

I am thinking of creating UIView classes and adding all views to single horizontal UIScrollView so that when we are done with one view and click next button, it slides to next view instead of creating multiple UIViewControllers and use UINavigationController to navigate to next page. .
Is it a good idea or causes performance issue? Can you please tell me which way is better and why?

  • 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-11T03:20:23+00:00Added an answer on June 11, 2026 at 3:20 am

    You’re probably better off going with the navigation controller in terms of memory management. At least doing so will make that part of the process easier, but there’s no reason why you can’t do this with a scroll view, you just have to keep track of what elements are on and off screen so you can alloc/dealloc different objects at the right time.

    However, if you do decide to go the scroll view route you can simple make buttons on your scroll view that adjust the scroll view’s content offset.x property to jump around between pages, and you can use this to set up the scroll view:

    Simply add the number of pages you want as entries in the array below, and the scroll view will be dynamically adjusted to accommodate new views for every page.

    [myScrollView setPagingEnabled:YES];
    
    NSArray *arrayOfViews = [[NSArray alloc] initWithObjects:@"First View",@"Second  View",@"Third View",@"Fourth View",@"Fifth View", nil];//number of views you want in your scroll view
    
    [arrayOfViews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx,BOOL *stop) {
        UIView *subView = [[UIView alloc] initWithFrame:CGRectMake(320 * idx, 0, 320, 480)];
        float randNum = arc4random() % 255;
        [subView setBackgroundColor:[UIColor colorWithRed:randNum/255 green:randNum/255 blue:randNum/255 alpha:1.0]];
        [myScrollView addSubview:subView];
        [myScrollView setContentSize:CGSizeMake(320 * (idx + 1), 480)];
    }];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was thinking about creating script that would do the following: Get all javascripts
I was thinking about creating an iPhone app front end for one of our
I am thinking of creating a web application that shows a map of a
was thinking about creating a Single class called 'Request' to handle and clean POST
I've been thinking about creating a Java framework that would allow programmers to specify
I'm creating an app that has a slider at the bottom of a view
My son just discovered that he could hit my view's Done button, which flips
I'm thinking about creating a location-aware iPhone app that could work offline by coming
I'm thinking of creating a 'People who viewed this also viewed' list that you
So I was thinking about creating a dynamic sql question, meaning that i want

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.