ios - Create controls in UIView at runtime? -
i have 1 uitextfield , button in view.
once button pressed, value in text field need searched fieldid column in core data table , value[comma separated].
separate string comma , assign values array.
a new uiview needs inserted in main screen , place n number[count of array] of labels , textfields , align.
i able 1, 2 , uiview creation.
can me create n number of controls in sub uiview @ runtime?
for(int i=0;i<self.yourarray.count; i++) { uilabel *label = [[uilabel alloc] initwithframe:cgrectmake(10,80*i+60,self.view.frame.size.width-20,60)]; label.text = [yourarray objectatindex:i]; [self.view addsubview:label]; }
please explain problem more !
Comments
Post a Comment