I set the text field to bind with a values controller key, a keypath of spacesPerTab, and setting 4 as the placeholder values. But when executing it, the text field displays nothing.
This works for checkboxes.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
The null-placeholder field isn’t the correct place to set a default value. It only sets what value will be displayed to the user if no value is set; nothing on the back end will see it.
To truly set a default value, send the standard user defaults object a
registerDefaults:message early on in your application. You’ll pass a dictionary that contains all of your default values.You may want to write the dictionary in a plist file, using Xcode or Property List Editor, and bundle it into your application and read it at run time. That will make the code that registers the defaults easier to read for not having a giant hard-coded dictionary in the way.