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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:12:00+00:00 2026-06-11T09:12:00+00:00

I am creating an app that takes information from a plist to create an

  • 0

I am creating an app that takes information from a plist to create an electronic catalogue. We have many different versions, and it would be nice if I didn’t have to go into the code for each app and set this number of sections for each one, and every time we make an update.

I want to use a do while loop to accomplish this, but can’t figure out how to rename my instance for each one. Please see the attached code, any help would be greatly appreciated!

scroller = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 44, 320, 387)];
int secNum = 8;
int secTemp = 0;
int frameWidth = self.view.frame.size.width;
int frameHeight = self.view.frame.size.height;

do {
    id *sectionViewController = [NSString stringWithFormat:@"svc%d",secTemp];

    SectionViewController *sectionViewController = [[SectionViewController alloc] init];
    [sectionViewTable setDataSource:sectionViewController];
    [sectionViewTable setDelegate:sectionViewController];
    sectionViewController.view = sectionViewController.tableView;

    sectionViewController.view.frame = CGRectMake(frameWidth*secTemp, 0, frameWidth, frameHeight);

    secTemp = secTemp + 1;
    [scroller addSubview:sectionViewController.view];
} while (secTemp < secNum);

scroller.contentSize = CGSizeMake(320*secTemp, 387);
scroller.pagingEnabled = YES;

I can’t figure out the rest, and have found nothing online to help myself. Thanks!

  • 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-11T09:12:01+00:00Added an answer on June 11, 2026 at 9:12 am

    Cant really get your question… you want the sectionViewController to have another name for every cycle to access it?

    Why don’t you create an NSMutableArray and add the instances of your sectionViewController to it? So you can receive it via index.

    Or did I get your question wrong?

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

Sidebar

Related Questions

I'm planning on creating an app that takes data from an iPhone and sends
I am creating an app that allows users to create and apply for jobs.
I'm creating and app that will rely on a database, and I have all
i'm working on creating an app that streams mp3s from a server. i'm using
I am creating an app that takes String's input by the user via EditText,
I am creating a TFS tool that will get changeset information from the TFS
I'm coding up a REST/RPC API for a web app that I'm creating. From
I am creating a mobile game that takes words from users and then validates
I am creating an iPad App that displays data I got from an API
I'm creating an app that lets users take and store photos in a Core

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.