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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:34:22+00:00 2026-06-17T00:34:22+00:00

First I apologize if this is a fairly simple question, but I am a

  • 0

First I apologize if this is a fairly simple question, but I am a newbie to programming. Basically what I want to do is have two UITextField’s where you enter a number into each, then press a button and in a third UITextField the sum of the first two UITextFields is displayed. Is this possible? Basically all I would need to know is how to define the IBAction method of the addition button. Here’s what “I’m thinking” but it doesn’t work because you can’t do math with string values.

-(IBAction)addthefields {

 textfield3.text = textfield1.text + textfield2.text;

}

Again sorry if its a simple question but any help is much appreciated

  • 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-17T00:34:23+00:00Added an answer on June 17, 2026 at 12:34 am

    This will probably work. It will add the values u’ve entered to the two textfields to your third textfield.

    -(IBAction)addFields
    {
    
       textfield3.text = [NSString stringWithFormat:@"%i",( [textfield1.text intValue] + [textfield2.text intValue] ) ];
    
    {
    

    One thing that u’ll have to keep in mind is that you cant calculate with string values, you’ll need integers, doubles and so on.

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

Sidebar

Related Questions

First, let me apologize if this is the world's stupidest question. But, I'm stumped
First of all, apologize because I have seen some posts about this, but I
First off, I apologize if this question has already been asked. I searched but
First, I apologize if this is not an appropriate venue to ask this question,
I'm fairly new to Eclipse so if this is something simple I apologize, however
First off, let me apologize if this has been asked already, but I can’t
First, this is the first programming class I've taken, so I apologize if this
I'm fairly new to Objective-C and iPhone programming so I apologize if this is
first post, so play nice! I have a fairly basic question about Python dictionaries.
Let me first apologize if this question could sound perhaps sort of amateurish for

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.