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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:22:22+00:00 2026-06-12T20:22:22+00:00

I am new to ios app development I have been working on a small

  • 0

I am new to ios app development I have been working on a small app that you may see below I have attached my code. What I am looking to do is add a button at the bottom of the app to allow the user to add another line each time the button is tapped another line would include another 3 columns, swell as adding a new line each time the button is tapped I would like the total(c & d in this case) to follow the same pattern as in the code. Multiply the weight(textField2 & textField3) by the number of(x): and add to previous total(c & d). Any help or advice would be greatly appreciated. Thanks.

Example:

Number of: 10

Name Weight Total

a 10 100

b 5 150

** I now want to give the user the option to add another 3 columns and continue on**

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController


- (IBAction)calculate {
    float x = ([textField1.text floatValue]);

float c = x*([textField2.text floatValue]);
float d = c+x*([textField3.text floatValue]);

label.text = [[NSString alloc] initWithFormat:@"%2.f", c];
label2.text = [[NSString alloc] initWithFormat:@"%2.f", d];}

- (void)viewDidLoad
{
    [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
  • 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-12T20:22:23+00:00Added an answer on June 12, 2026 at 8:22 pm

    The kind of dynamic list-based drawing you’re looking to do is better suited to UITableViews than just putting labels into a view. If you keep adding the labels to the view, you will eventually run out of space and unless the view you’re using is a UIScrollView, you won’t be able to scroll down to see your additional results.

    An introduction to UITableViews is a bit beyond the scope of something I can type in here, I think, but you can find a lot of good tutorials online – here’s one with sample code from GitHub: https://github.com/vladexologija/UITableView-introduction

    After you’ve gained a bit of familiarity with table views, I would, in this case:
    The additional rows you’re adding are just cells in the table view, and the button you’re looking to add at the end, should be in a UIView and assigned as the table’s footer view.

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

Sidebar

Related Questions

I'm new to apple's development scene and have been working on an app for
I am new to iOS app development. I have been reading the documentation on
new to iOS development, i have managed to create a basic app that can
I'm fairly new to iOS development, and I'm starting work on an App that
i am new to iOS development i am working on an app which is
I'm new to iOS development and to owning an iPad; I have an app
I am new to IOS development. I am working on an app in which
I am new to iOS development and there is an application that I have
I am very new to iOS development, I have an app all set and
I'm new to Android development, i'm trying to port an IOS app to Android.

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.