UITableView линейный разделитель видим для альтернативных ячеек в iOS 9
Я столкнулся с проблемой для разделителя строк UITableView. Линия видна для альтернативных рядов.
Добавление UIView с высотой 1 в ячейку даст решение, но это не правильный путь. И приведенный ниже код отлично работает для iOS 8, но в 9 он демонстрирует другую природу.
- (IBAction)curencySelect:(id)sender {
currencyTable = [[UITableView alloc]initWithFrame:CGRectMake(29, 257, 265,113) style: UITableViewStylePlain];
}
#pragma mark -
#pragma mark UITableViewDelegate
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section{
return currencyArray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
if (cell == nil) {
cell =[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"MyIdentifier"];
}
cell.textLabel.text = [currencyArray objectAtIndex:indexPath.row];
return cell;
}
Заранее спасибо.
1 ответ
Распространенные проблемы с симулятором, который не всегда может отображать изображения в 1 пиксель. Установите масштаб на 100% в Window->Scale.