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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:56:49+00:00 2026-05-31T06:56:49+00:00

I am creating an iPad app, in this I am dynamically creating the interface

  • 0

I am creating an iPad app, in this I am dynamically creating the interface in the device, here is the code.

- (void)setUpInterface{
    UIScrollView *scrollview = [[UIScrollView alloc] initWithFrame:CGRectMake(10, 10,self.view.frame.size.width-20, self.view.frame.size.height-20)];   

    int y = 0;
    for (int i=0; i < [labelArray count]; i++) {
        y=y+75;
        UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(20, y, 500, 30)];
        label.text = [NSString stringWithFormat:@"%@",[labelArray objectAtIndex:i]];
        label.backgroundColor = [UIColor clearColor];
        label.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth;
        [scrollview addSubview:label];

        UITextField *textBox = [[UITextField alloc]initWithFrame:CGRectMake(200, y, 500, 30)];
        textBox.borderStyle = UITextBorderStyleRoundedRect;
        textBox.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth;
        [scrollview addSubview:textBox];
    }

    scrollview.contentSize = CGSizeMake(self.view.frame.size.width-100, y*2);
    scrollview.backgroundColor = [UIColor scrollViewTexturedBackgroundColor];
    scrollview.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth;

    [self.view addSubview:scrollview];

}

At the end when I click on a button I want to get the data entered in each text box separately. How can I implement that? How to assign names to each objects?
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-05-31T06:56:51+00:00Added an answer on May 31, 2026 at 6:56 am
    for (UITextField *textField in [self.scrollview subviews])
    {
        if([textField isKindOfClass:[UITextField class]])
         {
            NSLog(@"text == %@", textField.text);
         }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an iPad app with splitview, here is the screen shot, In
I'm creating an iPad app, and I have two classes: NWRootViewController : UITableViewController and
I'm creating an iPad application which needs a UIPopoverController like this one (I mean,
Creating Traversals for Binary Search Tree with Recursion. void inOrder(void (*inOrderPtr)(T&)) { if(this->left !=
I am creating an iPad app. I do not yet have the $99 dev
How would one go about creating an ipad app that has a similar view
I'm creating a web app for the iPad and I'm trying to assign a
I'm trying to do the basics steps of creating a universal (iphone/ipad) app in
I am creating a webview app for iPad, and want to show a splashscreen
I'm creating a layout for an iPad app that will consist of xx number

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.