UIView.AutoresizingMask 속성

정의

슈퍼 뷰의 경계가 변경되면 수신기의 크기를 조정하는 방법을 지정하는 비트 마스크입니다.

public virtual UIKit.UIViewAutoresizing AutoresizingMask { [Foundation.Export("autoresizingMask")] get; [Foundation.Export("setAutoresizingMask:")] set; }
member this.AutoresizingMask : UIKit.UIViewAutoresizing with get, set

속성 값

기본값은 None입니다.

특성

설명

애플리케이션 개발자는 이전 Autoresizing Mask 기능보다 더 강력한 자동 레이아웃 기능을 사용할 수 있습니다.

AutoresizingMask 디바이스 회전 중에 발생하는 것과 같이 보기 크기 조정의 복잡성을 잘 처리하는 강력한 기능입니다. 그러나 반드시 완전한 솔루션은 아닙니다. 예를 들어 를 사용하는 UIScrollView경우 논리의 크기를 조정해야 ContentSize 할 수 있습니다. 이러한 상황에서 애플리케이션 개발자는 를 구독 UIDeviceOrientationDidChangeNotification 하고 추가 크기 조정 논리를 사용하여 사용자 지정 메서드를 구현할 수 있습니다.

//During initialization, subscribe to orientation changes              
NSNotificationCenter.DefaultCenter.AddObserver ("UIDeviceOrientationDidChangeNotification", DeviceRotated);

protected void DeviceRotated (NSNotification notification)
{
    //Code to resize UIScrollView.ContentSize and other custom on-rotation logic
}

적용 대상

추가 정보

  • <xref:UIKit.UIView.AutoResizingMask>