Я создал простой TableView
, но когда я прокручиваю вид таблицы в течение определенного времени, например, 5 минут, на одном экране, то после этого он начинает выглядеть очень запаздывающим.
Вот мойфрагмент кода -
Делегаты TableView: -
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"newFriendCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
cell.imageView.image = [UIImage imageNamed:@"image"];
cell.textLabel.text = @"Text cell";
cell.backgroundColor = [UIColor greenColor];
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 50;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 400;
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 200;
}
ПРИМЕЧАНИЕ. - Мне нужно объединить ячейку нескольких типов в tableView