Replaces the contents of this image markup with an image file.
- Parameter url: The URL of the image file to load and display.
- Throws: An error if the image file cannot be loaded or is in an unsupported format.
Image content is shown scaled to fill.
Replaces the contents of this image markup with a `CGImage`.
- Parameter image: The new image to display.
Image content is shown scaled to fill.
get · iOS 27.0+
featureSet
TypeScript
get featureSet(): FeatureSet
Swift declaration
var featureSet: FeatureSet { get }
The set of features used by this markup.
get · iOS 27.0+
orientation
TypeScript
get orientation(): _ImageIO_CGImagePropertyOrientation
Swift declaration
var orientation: CGImagePropertyOrientation { get set }
The orientation of the image content.
set · iOS 27.0+
orientation
TypeScript
set orientation(value: _ImageIO_CGImagePropertyOrientation)
Swift declaration
var orientation: CGImagePropertyOrientation { get set }
The orientation of the image content.
get · iOS 27.0+
renderFrame
TypeScript
get renderFrame(): { x: number; y: number; width: number; height: number }
Swift declaration
var renderFrame: CGRect { get }
The unrotated frame that tightly fits the rendered contents of the element.
This frame includes padding around `frame` to ensure it includes all the rendered
aspects of the content. For example, this frame will include the strokes, and
shadows of any contents.
get · iOS 27.0+
contentsBounds
TypeScript
get contentsBounds(): { x: number; y: number; width: number; height: number }
Swift declaration
var contentsBounds: CGRect { get set }
The portion of the image to display, in normalized coordinates.
Values are normalized from `0.0` to `1.0`, where `(0, 0)` is the top-left
and `(1, 1)` is the bottom-right of the source image.
Defaults to `CGRect(x: 0, y: 0, width: 1, height: 1)` (full image).
set · iOS 27.0+
contentsBounds
TypeScript
set contentsBounds(value: { x: number; y: number; width: number; height: number })
Swift declaration
var contentsBounds: CGRect { get set }
The portion of the image to display, in normalized coordinates.
Values are normalized from `0.0` to `1.0`, where `(0, 0)` is the top-left
and `(1, 1)` is the bottom-right of the source image.
Defaults to `CGRect(x: 0, y: 0, width: 1, height: 1)` (full image).
get · iOS 27.0+
allowedInteractions
TypeScript
get allowedInteractions(): MarkupInteractions
Swift declaration
var allowedInteractions: MarkupInteractions { get set }
Interactions that people can perform on this markup.
Use this to configure how people can interact with the markup, such as
preventing resizing, rotation, or deletion. The default is `.all`, which
allows all interactions. Set to `.readOnly` to prevent all modifications.
set · iOS 27.0+
allowedInteractions
TypeScript
set allowedInteractions(value: MarkupInteractions)
Swift declaration
var allowedInteractions: MarkupInteractions { get set }
Interactions that people can perform on this markup.
Use this to configure how people can interact with the markup, such as
preventing resizing, rotation, or deletion. The default is `.all`, which
allows all interactions. Set to `.readOnly` to prevent all modifications.
get · iOS 27.0+
accessibilityDescription
TypeScript
get accessibilityDescription(): (string) | null
Swift declaration
var accessibilityDescription: String? { get set }
The accessibility description of the image for assistive technologies.
set · iOS 27.0+
accessibilityDescription
TypeScript
set accessibilityDescription(value: (string) | null)
Swift declaration
var accessibilityDescription: String? { get set }
The accessibility description of the image for assistive technologies.
Removes all content not supported by the provided feature set.
- Parameter featureSet: The feature set to limit this markup to.
- Returns: True if this was successful and the feature set is now supported.
If the returned value is `true` then `self.featureSet.isSubset(of: featureSet)` will be `true`.
get · iOS 27.0+
id
TypeScript
get id(): MarkupID<ImageMarkup>
Swift declaration
var id: MarkupID<ImageMarkup>
Stable unique identity of the markup.
set · iOS 27.0+
id
TypeScript
set id(value: MarkupID<ImageMarkup>)
Swift declaration
var id: MarkupID<ImageMarkup>
Stable unique identity of the markup.
get · iOS 27.0+
frame
TypeScript
get frame(): { x: number; y: number; width: number; height: number }
Swift declaration
var frame: CGRect { get set }
The element's unrotated frame.
Together with `rotation` this defines the element's position in its parent. This won't
necessarily contain all the contents of an element, rotation and styling may cause the
element to extend beyond this frame. Use `renderFrame` for an unrotated frame that
contains the entire element.
set · iOS 27.0+
frame
TypeScript
set frame(value: { x: number; y: number; width: number; height: number })
Swift declaration
var frame: CGRect { get set }
The element's unrotated frame.
Together with `rotation` this defines the element's position in its parent. This won't
necessarily contain all the contents of an element, rotation and styling may cause the
element to extend beyond this frame. Use `renderFrame` for an unrotated frame that
contains the entire element.
Initializes and returns a new image markup from the specified parameters.
- Parameters:
- image: The image content to display.
- frame: The frame of the image.
- rotation: The rotation in radians of the image. Defaults to `0.0` (no rotation).
- image: The image content to display.
- orientation: The orientation of the image content. Defaults to `.up` (no rotation).
- opacity: The opacity of the image, ranging from `0.0` (fully transparent) to `1.0` (fully opaque). Defaults to `1.0`.
- contentsBounds: The portion of the image to display, in normalized coordinates from `0.0` to `1.0`. Defaults to `CGRect(x: 0, y: 0, width: 1, height: 1)` (full image).
- accessibilityDescription: The accessibility description of the image for assistive technologies. Defaults to `nil`.
- allowedInteractions: The flags controlling the interactions users can perform. Defaults to `.all`.
- id: The identity of the image. Defaults to a unique id.
Image content is shown scaled to fill.
Initializes and returns a new image markup from the specified parameters.
- Parameters:
- image: The image content to display.
- frame: The frame of the image.
- rotation: The rotation in radians of the image. Defaults to `0.0` (no rotation).
- opacity: The opacity of the image, ranging from `0.0` (fully transparent) to `1.0` (fully opaque). Defaults to `1.0`.
- contentsBounds: The portion of the image to display, in normalized coordinates from `0.0` to `1.0`. Defaults to `CGRect(x: 0, y: 0, width: 1, height: 1)` (full image).
- accessibilityDescription: The accessibility description of the image for assistive technologies. Defaults to `nil`.
- allowedInteractions: The flags controlling the interactions users can perform. Defaults to `.all`.
- id: The identity of the image. Defaults to a unique id.
Image content is shown scaled to fill.
get · iOS 27.0+
image
TypeScript
get image(): Promise<(_CoreGraphics_CGImage) | null>
Swift declaration
var image: CGImage? { get async }
The image content displayed by this markup.
Image content is shown scaled to fill.
This property is async because an in-memory `CGImage` is not always loaded from disk. The image property can
be `nil` when streaming the data model and the image asset has not yet been received.
get · iOS 27.0+
opacity
TypeScript
get opacity(): number
Swift declaration
var opacity: CGFloat { get set }
The opacity of the image.
Ranges from `0.0` (fully transparent) to `1.0` (fully opaque). Defaults to `1.0`.
set · iOS 27.0+
opacity
TypeScript
set opacity(value: number)
Swift declaration
var opacity: CGFloat { get set }
The opacity of the image.
Ranges from `0.0` (fully transparent) to `1.0` (fully opaque). Defaults to `1.0`.
get · iOS 27.0+
rotation
TypeScript
get rotation(): number
Swift declaration
var rotation: CGFloat { get set }
The element's rotation around the center of its frame.
Together with `frame` this defines the element's position in its parent.
set · iOS 27.0+
rotation
TypeScript
set rotation(value: number)
Swift declaration
var rotation: CGFloat { get set }
The element's rotation around the center of its frame.
Together with `frame` this defines the element's position in its parent.