UIView.ContentScaleFactor Property

Definition

The number of device pixels per logical coordinate point.

public virtual nfloat ContentScaleFactor { [Foundation.Export("contentScaleFactor")] get; [Foundation.Export("setContentScaleFactor:")] set; }
member this.ContentScaleFactor : nfloat with get, set

Property Value

The default value depends on the underlying hardware and the backing view type. The value is typically either 2.0 or 1.0.

Attributes

Remarks

The coordinate space used by application developers is measured in logical points. High-resolution (Retina) displays will have more than a single physical pixel per logical point and this property specifies the scale factor.

UIViews that are backed by a CAEAGLLayer may return 1.0 even if they are being displayed on a high-resolution screen.

Applies to