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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:50:59+00:00 2026-05-25T12:50:59+00:00

Possible Duplicate: How would I save and load a UITextField? I have tried EVERYTHING

  • 0

Possible Duplicate:
How would I save and load a UITextField?

I have tried EVERYTHING and unfortunately nothing works for me. I have probably tested about 10 ways of saving and loading the UITextFields but they don’t work. I have six UITextFields and want to save them when a button is pressed and load when viewDidLoad is called.

Please can I have some help as I’ve got to publish the app within the next day or two and I still haven’t managed to do this…

Thanks,

James

  • 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-25T12:51:00+00:00Added an answer on May 25, 2026 at 12:51 pm
    NSUserDefaults *defaults=[NSUserDefaults standardUserDefaults];
    
    NSString* textField1Text = textField1.text;
    [defaults setObject:textField1Text forKey:@"textField1Text"];
    
    NSString* textField2Text = textField2.text;
    [defaults setObject:textField2Text forKey:@"textField2Text"];
    
    NSString* textField3Text = textField3.text;
    [defaults setObject:textField3Text forKey:@"textField3Text"];
    
    NSString* textField4Text = textField4.text;
    [defaults setObject:textField4Text forKey:@"textField4Text"];
    
    NSString* textField5Text = textField5.text;
    [defaults setObject:textField5Text forKey:@"textField5Text"];
    
    NSString* textField6Text = textField6.text;
    [defaults setObject:textField6Text forKey:@"textField6Text"];
    
    [defaults synchronize];
    
    NSString* temp = [defaults objectForKey:@"textField1Text"];
    NSString* temp = [defaults objectForKey:@"textField2Text"];
    NSString* temp = [defaults objectForKey:@"textField3Text"];
    NSString* temp = [defaults objectForKey:@"textField4Text"];
    NSString* temp = [defaults objectForKey:@"textField5Text"];
    NSString* temp = [defaults objectForKey:@"textField6Text"];
    
    NSLog(@"%@,%@,%@,%@,%@,%@",temp1,temp2,temp3,temp4,temp5,temp6);
    

    NEW EDIT

      - (IBAction) saveBtnPresssed : (id) sender
      {
    
            NSUserDefaults *defaults=[NSUserDefaults standardUserDefaults];
    
            NSString* textField1Text = textField1.text;
    
            [defaults setObject:textField1Text forKey:@"textField1Text"];
    
            NSString* temp = [defaults objectForKey:@"textField1Text"];
    
            NSLog(@"%@",temp);
    
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How would I stop this foreach loop after 3 iterations? I have
Possible Duplicate: How can I save and load the alpha values of a UIButton
Possible Duplicate: How would you count occurences of a string within a string (C#)?
Possible Duplicate: What WPF books would you recommend? GUI's written using WPF seem to
Possible Duplicate: Complex CSS selector for parent of active child How would I make
Possible Duplicate: When to Use Static Classes in C# Questions in the title..........i would
Possible Duplicate: Maximum length of the textual representation of an IPv6 address? What would
Possible Duplicate: Number of occurrences of a substring in an NSString? I would like
Possible Duplicate: JavaScript: Why the anonymous function wrapper? I would like to ask you
Possible Duplicate: Entity Framework with NOLOCK I'm using EF4 and .Net 4 to load

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.