I’m new to objective C, I have a view based application which communicates with a web service and recives an xml, parse it and map its contens an appropriate view component (e.g if thats a date show the question with datepicker, if question has 2 values show it with a segmented control, if more with a pickerview..etc) so its a dynamic questionary with many pages filled with multiple components.
how can I do the design for the mapping the xml response into related UI view components on runtime? I want to make the code as object orient as possible and not too many if elses in my view controller class, but instead it should only receive a let’s say “uiview object” filled with necessary view components and it will just show it. I have a UiScrollView and want to add new different approprite Uicomponents(Picker, textbox, label..) to it on real time, How can I do this? I think in the Interface builder I only need to put the scrollview and the rest will be in code? and using a scrollview a good choice here? thanks.
[self.view addSubView: imageview]; [self.scrollView addsubview:pickerview]; [self.view addSubView:scrollview];
like wise the custom view may be like uibutton,textfield,textview,imageview