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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:37:42+00:00 2026-06-04T03:37:42+00:00

i have two UItextFields, userNameTextField and passwordTextField and a UIbutton connection. I would like

  • 0

i have two UItextFields, userNameTextField and passwordTextField and a UIbutton connection. I would like to have what the user typed in the userNametextField and the passwordTextField, How i can do this please ?? thanks for your answer.

#pragma mark - User auhtentification
-(IBAction)userAuthentificate{
    BOOL loginValid = YES;
    BOOL passwordValid = YES;   // Not specified yet

    // contrioll d'interfac__ on test login et password
    if (loginValid && passwordValid) {

    NSString *jsonRequest = @"{\"login\":\"Samir\",\"password\":\"test\",\"mail\":\"test@gmail.com\"}";


        //  NSString *jsonRequest = @"{\"login\":\"Samir\",\"password\":\"test\",\"mail\":\"samir@gmail.com\",\"editor\":\"1\"}";


        NSString *request_url =@"http:.../register"; // Url WS
        NSURL *url = [NSURL URLWithString:request_url];
        self.currentRequest = [ASIFormDataRequest requestWithURL:url];
        currentRequest.delegate =self;
        NSData *requestData = [NSData dataWithBytes:[jsonRequest UTF8String] length:[jsonRequest length]];
        [self.currentRequest appendPostData:requestData];
        [self.currentRequest setRequestMethod:@"POST"];

        [self.currentRequest startSynchronous];
    }
}
  • 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-04T03:37:44+00:00Added an answer on June 4, 2026 at 3:37 am

    You can put something like this in the place of your jsonRequest string (the code uses the SBJson framework):

    NSDictionary *container = [[NSDictionary alloc] initWithObjectsAndKeys:
                                [loginTextField text], @"login",
                                [passwordTextField text], @"password",
                                [mailTextField text], @"mail"];
    
    NSString *jsonString = [container JSONRepresentation];
    // don't forget to release container if not using ARC AFTER creating the NSData object
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 3 UITexfield, the user can fill in the first two, but the
I currently have two UITextFields inside two corresponding UITableViewCells. This is how it looks:
I have two UITextFields which users can enter in a latitude and longitude, these
I have a form with two UITextFields and a button. The user enters values
I have this method here that turns integer inputs from two UITextFields into binary
I have a modal set up like this: Despite appearances, the first two fields
I have two UITextFields in the App as IBOutlets and I have made a
I would like to create a UIView has multiple UITextFields validates each one as
I have a UITextField where user can enter a name and save it. But,
i have an if statement comparing two NSStrings, one is user input from a

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.