1
Interface Builder
에는 장치 회전시 화면을 다시 그리는 방법을 앱에 알려주는 제약 조건이 있습니다.IB에서 프로그래밍 방식으로 제약 조건을 설정하는 방법이 있습니까?
프로그래밍 방식으로 설정하는 방법이 있습니까?
Interface Builder
에는 장치 회전시 화면을 다시 그리는 방법을 앱에 알려주는 제약 조건이 있습니다.IB에서 프로그래밍 방식으로 제약 조건을 설정하는 방법이 있습니까?
프로그래밍 방식으로 설정하는 방법이 있습니까?
autoresizingMask
을 설정해야합니다.
It보기의 크기가 자동으로 조정되는 방식을 지정합니다. (이것은 Interface Builder
에서 설정 한 것입니다.)
enum {
UIViewAutoresizingNone = 0,
UIViewAutoresizingFlexibleLeftMargin = 1 << 0,
UIViewAutoresizingFlexibleWidth = 1 << 1,
UIViewAutoresizingFlexibleRightMargin = 1 << 2,
UIViewAutoresizingFlexibleTopMargin = 1 << 3,
UIViewAutoresizingFlexibleHeight = 1 << 4,
UIViewAutoresizingFlexibleBottomMargin = 1 << 5
};
typedef NSUInteger UIViewAutoresizing;