RotateTransform

public class RotateTransform : Transform

Rotates an image in a range from 0 to 359 degrees or based on Exif information.

Lifecycle

  • Initializes a RotateTransform object with rotation based on Exif information.

    Declaration

    Swift

    public init()
  • Initializes a RotateTransform object using a given rotation degree.

    Declaration

    Swift

    public init(deg: Int)

    Parameters

    deg

    The rotation angle in degrees. Valid range: 0...359

Public Functions

  • Adds the exif option.

    Declaration

    Swift

    @discardableResult
    func exif(_ value: Bool) -> Self

    Parameters

    value

    If true, sets the Exif orientation of the image to Exif orientation 1. A false value takes an image and sets the exif orientation to the first of the eight EXIF orientations. The image will behave as though it is contained in an html img tag if displayed in an application that supports Exif orientations.

  • Adds the background option.

    Declaration

    Swift

    @discardableResult
    func background(_ value: UIColor) -> Self

    Parameters

    value

    The background color to display if the image is rotated less than a full 90 degrees.