How can I create array objects from UITextFields? I also want an if statement for each object to check if the UITextField’s text length is more than 1.
How can I do this using this core code?:
maincelltext = [[NSArray alloc] initWithObjects:@”UITextField 1 Content Here”,@”UITextField 2 Content Here”,@”UITextField 3 Content Here”,@”UITextField 3 Content Here”,nil];
Thanks!
Use NSMutableArray instead, and addObject:
if(textField1.text.length > 1) then [yourMutableArray addObject:textField1.text];and so on…Something like this: