I have added textfields dynamically to scrollview as below:-
for(int i = 0; i< responseBillPay.billerDetails.payeeFormat.count; i++) {
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, y, width, height)];
textField.borderStyle = UITextBorderStyleRoundedRect;
textField.placeholder = [responseBillPay.billerDetails.payeeFormat[i] name];
textField.delegate = self;
[innerScroll addSubview:textField];
}
Now i want to set maximum length to each textfield.How could I do this? I got the response of webservice as :-
payeeFormat =
(
{
displayFlag = false;
length = 4;
name = "BU(Billing Unit)";
validation = "Please enter 4 digits BU(Billing Unit)";
},
{
displayFlag = false;
length = 2;
name = "PC(Processing Cycle)";
validation = "Please enter only numbers in PC(Processing Cycle),PC(Processing Cycle) should be maximum 2 digits,PC(Processing Cycle) should be minimum 1 digit";
},
{
displayFlag = true;
length = 12;
name = "Consumer No.";
validation = "Consumer No. should be maximum 12 digits,Consumer No. should be minimum";
}
);