So..I've managed to rig up a table view cell to display a segmented control. It actually works pretty well. The problem is that if I try to reload anything in the table (even a specific row with reloadRowsAtIndexPaths) the segmented control disappears.
This is how I currently have it set up where in the cellForRowAtIndexPath delegate method:
Any ideas why this would be happening or how to fix it? Thanks
This is how I currently have it set up where in the cellForRowAtIndexPath delegate method:
Code:
// segControl is declared in the header
segControl = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"Option1", @"Option2", nil]];
segControl.frame = CGRectMake(-1.0f, -1.0f, 302.0f, 46.0f);
[segControl addTarget:self action:@selector(segChanged:) forControlEvents:UIControlEventValueChanged];
[cell.contentView addSubview:segControl];
Any ideas why this would be happening or how to fix it? Thanks