Instance Property


The ideal presentation size of the item.


var preferredPresentationSize: CGSize { get set }
var preferredPresentationSize: NSSize { get }


When displaying the item, the value in this property represents the ideal size at which to display the item. The size in this property may differ from the size in the sourceFrame rectangle. For images, video, and other content with a natural size, the item automatically derives the size from that content. If the value in this property is NSZeroSize, use the size specified in the sourceFrame rectangle.

See Also

Getting the Visual Attributes

var sourceFrame: NSRect

The rectangle (in screen coordinates) occupied by the item in the host app’s source window.

var containerFrame: NSRect

The rectangle (in screen coordinates) of the item’s visible content.

var preferredPresentationStyle: NSItemProvider.PreferredPresentationStyle

The preferred style for presenting the item provider's data.

enum NSItemProvider.PreferredPresentationStyle

The presentation styles that determine how a view should show an item provider's data.