I am trying to populate a number of UITextFields with data. Currently, I am doing it line-by-line.
myFirstName.text = originalPerson.firstname ;
myLastName.text = originalPerson.lastname;
myAddress1.text = originalPerson.address1;
Is there a way to do it programatically, in a loop?
You could add your text fields to an array (or
IBOutletCollection), and your keys to another array, and then in your loop assign the value for the key in your array to the equivalent text field in your other array, but by the time you’ve done and maintained and debugged all that, I don’t think you’ll have saved yourself much.