UITableViewCell изменить порядок просмотра клипов в iOS 13 - PullRequest
0 голосов
/ 16 апреля 2020

Я поместил фоновое изображение в UITableViewCell, чтобы сделать его более визуально привлекательным. В iOS 13 фоновое изображение обрезается с помощью элемента управления переупорядочением.

enter image description here

Это не происходило с более старыми версиями ОС.

enter image description here

Код прост:

    // Put a border around mBackgroundImage. Make it slightly smaller than the size of the cell so that the border doesn't run all the way to the edges.
cell.mBackgroundImage.frame = CGRectMake(2, 2, cell.frame.size.width-4, cell.frame.size.height-4);
cell.mBackgroundImage.layer.cornerRadius = 4;
cell.mBackgroundImage.layer.borderColor = [UIColor colorWithWhite:0.92 alpha:1.0].CGColor;
cell.mBackgroundImage.layer.borderWidth = 1;
cell.mBackgroundImage.layer.backgroundColor = [UIColor colorWithRed:1.0 green:1.0 blue:0.95 alpha:1.0].CGColor;

Есть предложения?

1 Ответ

0 голосов
/ 18 апреля 2020

Проблема решена путем установки для cell.contentView.clipsToBounds значения NO. Похоже, cell.contentView.clipsToBounds = YES был проигнорирован до iOS 13.

...