Basically, I've been tasked to work on a Xamarin.iOS app (predominantly for tablets only) that would display a long scrollable form that contains ~200 controls (buttons, switches, text fields, etc...).
Normally, I would create an instance of the control, assign values to it's properties and then add the control to the view to display but with 200 controls, it seems like a lot of redundancy and long classes.
How can I best architect this app to prevent redundancy or make the controls populate dynamically?
UILabel label1 = new UILabel(); label1.Text = "label text"; UILabel label2 = new UILabel(); label2.Text = "label text"; //... //then do this like 200 times to show labels with different names
Can I do something like this?
//in a foreach with amount of controls UILabel label = new UILabel(); label.Text = dynamicallyGeneratedText;
But in general, what's the best way to architect an app with long, scrollable form that the user has to fill out? What are some ways I can make my code more dynamic and less hardcoded?