Q:

iOS: Adding array to create a dynamic cell

I'm trying to create a table cell which is populated with text fields. However the number of text fields is never a fixed amount. I figured I'd just shoot the array into the table cell and then do the rest from there.
Yet I can't seem to figure out how to do this... Ideally I would be able to access an array with the necessary data from - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier in my UITableViewCell. Then loop through and allocate the necessary number of text fields necessary.
I added a myArray property to the cell, then did an alloc init in the method above, but still can't access it from my view controller. e.g. cell.myArray = ...
How can I accomplish this? Is there a better way I should be doing it? This is just the first way that came to mind. Any help is appreciated, thanks guys.
EDIT (Rough Example):
//MyCell.h

@interface ITDContactDetailsCell : UITableViewCell
    @property (strong, nonatomic) NSMutableArray *myArray;
@end

//MyCell.m

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
        self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
        if (self) {
            _myArray = [[NSMutableArray alloc]init];
            //Do some stuff with array (like add UITextViews)
        }
}

//MyViewController.m

- (UITableViewCell*)tableView:(UITableView *)table cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  NSString *cellIdentifier = @"ContactDetails4LineCell";
  MyCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
     //This doesn't even register
     cell.myArray = [NSMutableArray arrayWithObjects: @"a", @"b", nil];

}

A:

You may build your own setter on the ITDContactDetailsCell class.  The following signature is what gets called when the VC says cell.myArray = ...
- (void)setMyArray:(NSMutableArray *)array {

    _myArray = array;  // this + what ARC does to it is what the synthesized setter does

    // here, we do something with the array so the user can interact with it
    // labels are simpler, but textFields are the same idea
    CGFloat x = 10, y = 10;
    for (NSString *string in array) {
        CGRect frame = CGRectMake(x,y,60,20);
        UILabel *label = [[UILabel alloc] initWithFrame:frame];
        label.text = string;
        [self addSubview:label];
        x += 60;
    }
}

