我正在使用 EasyTableView 库,你能告诉我,当我为我的 Tableview 动态创建行时,为什么它在 Instruments 中显示出如此多的性能滞后?
上图中的代码如下:
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;