UITableView Atraso devido a sombras e bordas
Tenho o código a seguir para adicionar uma cor de borda e sombra ao fundo do meu UITableViewCell. Meu problema é que esse código causa um grande atraso no próprio tableView.
Por favor, você pode me dizer como posso otimizar meu código, impedindo o atraso do UITableVie
if ([cell viewWithTag:012] == nil && comment.isReply == NO) {
UIImageView *iv = [[[UIImageView alloc] initWithFrame:frame] autorelease];
[iv setImage:[UIImage imageNamed:@"paper"]];
[iv setTag:012];
[cell insertSubview:iv atIndex:0];
[iv.layer setBorderWidth:1.0];
[iv.layer setBorderColor:[[UIColor whiteColor] CGColor]];
[iv.layer setShadowColor:[[UIColor blackColor] CGColor]];
[iv.layer setShadowOffset:CGSizeMake(0, 1)];
[iv.layer setShadowOpacity:0.75];
}
else if ([cell viewWithTag:012] == nil && comment.isReply == YES) {
frame.origin.x += 35;
UIImageView *iv = [[[UIImageView alloc] initWithFrame:frame] autorelease];
[iv setImage:[UIImage imageNamed:@"paper"]];
[iv setTag:012];
[cell insertSubview:iv atIndex:0];
UIImage *arrow = [UIImage imageNamed:@"arrow"];
UIImageView *ivs = [[[UIImageView alloc] initWithFrame:CGRectMake(-12, ([cell frame].size.width / 2) + ([arrow size].width/2) , arrow.size.width, arrow.size.height)] autorelease];
[cell addSubview:ivs];
[iv.layer setBorderWidth:1.0];
[iv.layer setBorderColor:[[UIColor whiteColor] CGColor]];
[iv.layer setShadowColor:[[UIColor blackColor] CGColor]];
[iv.layer setShadowOffset:CGSizeMake(0, 0)];
[iv.layer setShadowOpacity:0.75];
}