I don’t know if ContentMode supports OR operation, that is (you need to test this method), view.contentMode = UIViewContentModeScaleAspectFit|UIViewContentModeRight;
You can extend the UIImage method and crop the UIImage content starting from the right side,
view.contentMode = UIViewContentModeScaleAspectFit|UIViewContentModeRight;
You can extend the UIImage method and crop the UIImage content starting from the right side,
Similarly, this method can be extended to center cropping, cropping from top, cropping from bottom, etc.
view.layer.masksToBounds = YES;//内容超出控件将不进行显示