0

I've created custom UIView with backgroundImage for UITableViewCell selected state like that:

UIView *selectedBgView = [[UIView alloc] init];
selectedBgView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"selectedCellBg.png"]];
selectedBgView.transform = CGAffineTransformMakeRotation(M_PI_2);
cell.selectedBackgroundView = selectedBgView;

I've also rotated this custom view counter-clockwise with no luck.

In portrait is ok on first boot. But the problem is when I rotate device, selected cell background pattern gets weird.

Portrait:

enter image description here

Landscape:

enter image description here

Also when device switches back from landscape it stays weirdly painted.

Borut Tomazin
  • 8,041
  • 11
  • 78
  • 91

1 Answers1

0

I just figured it out. Instead of transforming UIView clockwise I rotated image on file system clockwise and it works.

Borut Tomazin
  • 8,041
  • 11
  • 78
  • 91