IMGLY

@available(iOS 9.0, *)
@objcMembers
open class IMGLY : NSObject

IMGLY provides methods to unlock and customize the SDK.

  • Enables or disables Metal usage.

    Declaration

    Swift

    public dynamic static var metalDisabled: Bool { get set }
  • Enables or disabled Metal shader usage.

    Declaration

    Swift

    public dynamic static var metalFiltersDisabled: Bool { get set }
  • Force extended sRGB color space on export.

    Declaration

    Swift

    public dynamic static var forceExtendedSRGBColorSpace: Bool
  • Force render on export even if there are no operations defined that would change the input image.

    Declaration

    Swift

    public dynamic static var forceRenderHighResolutionImage: Bool
  • Possible errors that could be thrown by this class.

    See more

    Declaration

    Swift

    public enum Error : Swift.Error
  • Unlocks the SDK with the given license. Calling any unlock method prior to using any parts of the SDK is required.

    Declaration

    Swift

    public class func unlockWithLicense(at url: URL)

    Parameters

    url

    The file url where the license file is located.

  • Unlocks the SDK with the given license. Calling any unlock method prior to using any parts of the SDK is required.

    Throws

    Throws a license error if there are issues with the given license.

    Declaration

    Swift

    @objc(unlockWithLicenseFromURL:error:)
    public class func unlockWithLicense(from url: URL) throws

    Parameters

    url

    The file url where the license file is located.

  • Unlocks the SDK with the given license. Calling any unlock method prior to using any parts of the SDK is required.

    Throws

    Throws a license error if there are issues with the given license.

    Declaration

    Swift

    @objc(unlockWithLicenseFromString:error:)
    public class func unlockWithLicense(from string: String) throws

    Parameters

    string

    The license string in JSON format.

  • Unlocks the SDK with the given license. Calling any unlock method prior to using any parts of the SDK is required.

    Throws

    Throws a license error if there are issues with the given license.

    Declaration

    Swift

    @objc(unlockWithLicenseFromDictionary:error:)
    public class func unlockWithLicense(from dictionary: [String : Any]) throws

    Parameters

    dictionary

    The license dictionary which can be encoded in JSON format.

  • PhotoEditor SDK analytics instance. All screen views and events are logged with this instance.

    Declaration

    Swift

    public static let analytics: Analytics
  • The progress view that is being used to display progress. You can provide your own progress view as long as it adopts the ProgressView protocol.

    Declaration

    Swift

    public static var progressView: ProgressView
  • Allows to set a custom dictionary that contains dictionaries with language locales. Will override localization found in the bundle, if a value is found. Falls back to en if localization key is not found in dictionary.

    Declaration

    Swift

    public static var localizationDictionary: [String : [String : String]]?
  • Register a custom block that handles translation. If this block is nil, the PhotoEditorSDK.bundle + localizationDict will be used.

    Declaration

    Swift

    public static var localizationBlock: ((String) -> String?)?
  • Register a custom block that returns custom images for the given image name. If this block is nil, the image from the PhotoEditorSDK.bundle will be used.

    Declaration

    Swift

    public static var bundleImageBlock: ((String) -> UIImage?)?
  • Register a custom block to modify each stage of the render pipeline. This block will be called for each render mode of each render pass and is passed a CIImage object and the PESDKRenderMode that was added to the image prior to calling this or nil if no render mode has been added for this call (i.e. for the base image). Use this block to modify the render pipeline.

    Attention

    Doing too much work in this block can have a severe impact on performance.

    Declaration

    Swift

    public static var renderPipelineBlock: ((CIImage, PESDKRenderMode?) -> CIImage)?
  • Register a custom block that returns a ToolbarItem for a view controller. Both the view controller as well as the default ToolbarItem are passed as arguments. If you return nil, no ToolbarItem is pushed onto the toolbar and thus the previous toolbar item remains visible. If this block is nil, the default toolbar item for each view controller will be used.

    Declaration

    Swift

    public static var toolbarItemBlock: ((UIViewController, ToolbarItem?) -> ToolbarItem?)?
  • Allows you to use a specific subclass instead of the default PhotoEditor SDK classes. This works across the whole framework with any public class.

    Throws

    Throws an error if the replacing class is not a subclass of the builting class.

    Note

    Only set from the main thread, before you first use the object. Set up your class overrides before calling any other methods.

    Declaration

    Swift

    public static func replaceClass(_ builtinClass: NSObject.Type, with replacingClass: NSObject.Type) throws

    Parameters

    builtinClass

    The class that should be replaced, e.g. PhotoEditViewController.self.

    replacingClass

    The class that should be used instead (must be a subclass of builtinClass).

  • Returns the replacing class for a given replaced class.

    Declaration

    Swift

    public static func replacingClass<ReplacedClass>(for replacedClass: ReplacedClass.Type) -> ReplacedClass.Type where ReplacedClass : NSObject

    Parameters

    replacedClass

    The class to get the replacing class for.

    Return Value

    The replacing class.