Reputation: 769
I have a button,a textfield and some labels.I want create labels by a button display with scroll
Textfield is Number repeat or copy of labels.User when enter 5 to textfield labels will like ;
LabelA LabelB LabelC (Original labels)
LabelA2 LabelB2 LabelC2
LabelA3 LabelB3 LabelC3
LabelA4 LabelB4 LabelC4
LabelA5 LabelB5 LabelC5
Upvotes: 0
Views: 140
Reputation: 20021
On button action
[textField.text intValue]
Something like this
For giving you an idea ,not the real working code,this is for snigle column Do for 3 labels added programatically with suitable frame
for (int i=0; i<[textField.text intValue]; i++)
{
UILabel *label= [[UILabel alloc]initWithFrame:CGRectMake(X, Y, Width, height)];
[self.view addSubview:label];
}
Upvotes: 2