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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:01:34+00:00 2026-05-14T20:01:34+00:00

I am writing a program where I where the first time a user runs

  • 0

I am writing a program where I where the first time a user runs it – they will have to fill out about 10 different UITextFields. I am trying to save the fields so that on subsequent runs of the program that whatever they previously put will already be displayed in those UITextFields so the wont have to re-input it in – unless they want to edit something in which case they still have that option. I think that I have figured out a good way to save the strings using NSUserDefaults but now I am trying to figure out how to have those fields populate a UITextField – it doesnt seem as easy as if they were UILabels. This is the route I am attempting:

// in the viewDidLoad portion.
NSUserDefaults *userData = [NSUserDefaults standardUserDefaults]; //Hooks.
NSString *placeHolderName = [userData stringForKey:@"name"];

txtName.text = @"%@", placeHolderName;

When I do this, it simply displays the ‘%@’ in the textfields. I want whatever variable being held by placeHolderName to be automatically put into that UITextField. Is this possible?

  • 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-14T20:01:35+00:00Added an answer on May 14, 2026 at 8:01 pm

    Just use:

    txtName.text = placeHolderName;
    

    or

    txtName.text = [NSString stringWithFormat:@"%@", placeHolderName];
    

    In code you have now you accidentally use Comma operator that evaluates its first expression (txtName.text = @”%@”), discards the result and returns the 2nd (placeHolderName)

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

Sidebar

Related Questions

I am just about done writing my first mergesort program and am running into
First time I'm writing something here. I have a question that i hope someone
It is my first time to create a program with file reading and writing
I'm writing a program in Ruby for the first time (I'm using RubyMine as
Python newb and first-time poster... I'm building a mass disk copying program and have
For the first time, I am writing a fairly complex application, which will remember
first time post here. I am in the process of writing a Java program
I've been writing a program in C to move the first 4 bits of
Im writing a program that should read input via stdin, so I have the
I'm writing a program about image-processing. I need to store an int square matrix

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.