I have a table cell with a custom backgroundView which looks great while in portrait, however when I move to landscape the backgroundView gets stretched to match the landscape width. How can I make it so the backgroundView stays the same height/aspect ratio?
This seems to do nothing:
self.backgroundView.autoresizingMask = UIViewAutoresizingNone;
Is there a solution to this? Here’s some screenshots to illustrate. The first image shows portrait view properly, the second shows landscape view with the middle rows scaled when I want them to be the same size as they were in portrait, just located in the middle (much like the images above them, which are actually just UIImagViews added directly to the cell, rather than changing the backgroundView property).
Thanks!
Figured this out. All I needed to do was set the contentMode.