I am creating a custom cell.
In this I added 3 text fields. so I want to save these text field values in nsmutablearray.
when i try to use this code
UITextField *valueField = [[UITextField alloc] initWithFrame:CGRectMake(165,6, 135, 30)]; valueField.borderStyle = UITextBorderStyleRoundedRect; [cell addSubview:valueField]; [array1 addObject:valueField.text]; [valueField release];
I get an error like this
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSMutableArray insertObject:atIndex:]: attempt to insert nil object at 0'
so please tell me the reason thanks in advance.
source share