I am using EasyTableView Library, Can you please tell me , When I am dynamically creating rows for my Tableview, why it is showing so much performance lag in the Instruments?
The Code in the above image is as follows:
CGRect buttonRect = CGRectMake(10, 0, 473, 677);
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = buttonRect;
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, button.frame.size.height-100, button.frame.size.width,50)];
label.backgroundColor = [UIColor blackColor];
label.textColor = [UIColor whiteColor];
label.textAlignment = NSTextAlignmentCenter;
[button addSubview:label];
// Use a different color for the two different examples
return button;

It looks like you’re regenerating a cell view for every cell (i.e. never reusing the views).
Looking at the docs for EasyTableView, it looks like ETV does NOT incorporate a view caching mechanism, so it’s generating new views for every row of the tableview.
And if your tableview has dozens or hundreds of rows, you are in deep trouble. I suggest getting rid of EasyTableView and using UITableViews that have cell view caching and reuse.
Alternatively, implement your own view caching and reuse. So in your case you’d have a pool of UIButtons, and every time you need to return a UIButton in
easyTableView:viewForRect:, check if there’s one that isn’t currently visible on screen. If so, reuse it and change whatever you need (label text, etc…). Otherwise, create a new one.