Need chance to customize newly created UICollectionViewCell

Originator:an00na
Number:rdar://14656106 Date Originated:05-Aug-2013 09:57 PM
Status:Open Resolved:
Product:iPhone SDK Product Version:iOS 7
Classification:New Feature Reproducible:
 
The current API design makes it impossible to customize newly created UICollectionViewCell programmatically. I mean ONLY customize once in the whole lifetime of UICollectionViewCell, not every time when using it. In contrast, this can be done for UITableViewCell in code like this:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    TaskCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TaskCell"];
	if (cell == nil) {
		cell = [[TaskCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"TaskCell"];
                // Initial customization of TaskCell that can not be done in its init method.
		cell.delegate = self;                
	}
	[self configureCell:cell atIndexPath:indexPath];
    return cell;
}

So I suggest we should have similar API for UICollectionView and UICollectionViewCell.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!