After upgrading to iOS 8, my application has serious performance issues when scrolling in a UITableView - this is not at all on iOS 7. It seems to be a little behind or constantly bouncing a bit.
This affects both older (2nd generation) and newer (4th generation Retina) iPads, but not the iPhone, as my iPhone 5 scrolls through TableViews, built in exactly the same way.
It is important . It seems that this only affects the UITableViewControllers presented modally in the form sheet, and not the table views created manually elsewhere in the UIViewController by default. Even the formally presented UIViewController sheet form with a custom table view (as a property, for example) is not affected.
The tools say that about 3% of the processor’s time is spent on the cellForRowAtIndex method, and this method is the most consuming. Of these 3%, 75% goes to the line:
EventTableViewCell *cell = [tableView
dequeueReusableCellWithIdentifier:CellIdentifier
forIndexPath:indexPath];
cellForRowAtIndex is as follows:
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"tablecell";
EventTableViewCell *cell = [tableView
dequeueReusableCellWithIdentifier:CellIdentifier
forIndexPath:indexPath];
NSDictionary *thismsg = [messages objectAtIndex:indexPath.row];
switch ([[thismsg objectForKey:@"type"] intValue]) {
case 1:
cell.eventTitleLabel.textColor = [UIColor greenColor];
break;
case 2:
cell.eventTitleLabel.textColor = [UIColor redColor];
break;
case 3:
cell.eventTitleLabel.textColor = [UIColor colorWithRed:0.0 green:128.0/255.0 blue:1.0 alpha:1];
break;
case 4:
cell.eventTitleLabel.textColor = [UIColor orangeColor];
break;
default:
cell.eventTitleLabel.textColor = [UIColor whiteColor];
break;
}
cell.eventTitleLabel.text = [thismsg objectForKey:@"m"];
cell.timestampLabel.text = [thismsg objectForKey:@"t"];
cell.authorNameLabel.text = [thismsg objectForKey:@"a"];
cell.backgroundColor = [UIColor blackColor];
return cell;
}
In my subclass cell, there are only a few shortcuts made with IB, which are the ones to which the text is assigned.
The storyboard settings for the View Viewer and Table View are as follows:

EventTableViewCell.h:
, ,
@interface EventTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *eventTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *timestampLabel;
@property (weak, nonatomic) IBOutlet UILabel *authorNameLabel;
@end
EventTableViewCell.m:
@implementation EventTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
}
return self;
}
- (void)awakeFromNib
{
UIView *bgColorView = [[UIView alloc] init];
bgColorView.backgroundColor = [UIColor darkGrayColor];
[self setSelectedBackgroundView:bgColorView];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
}
@end
Debug Navigator (, - ). 15% . 25% - , , iPad 4 . , , , , . 0% - , , , , - . , , , 23 , .
