ui/autolayout/layoutpriority
레이아웃 우선순위. (UIKit 의 UILayoutPriority 와 같은 사상)
Layout priority. (Same concept as UIKit's UILayoutPriority)
LayoutPriority
레이아웃 우선순위. (UIKit 의 UILayoutPriority 와 같은 사상)
- required (1000): 반드시 만족해야 하는 우선순위. LayoutStrength.required 로 매핑.
- defaultHigh (750): 기본 압축 저항 (compression resistance) 우선순위.
- defaultLow (250): 기본 hug 우선순위.
- fittingSizeLevel (50): systemLayoutSizeFitting 호출 시 권장 크기 우선순위.
- 1 ~ 999 의 값은 LayoutStrength.fromPriority 를 통해 medium tier 로 매핑된다.
Layout priority. (Same concept as UIKit's UILayoutPriority)
- required (1000): priority that must be satisfied. Maps to LayoutStrength.required.
- defaultHigh (750): default compression resistance (compression resistance) priority.
- defaultLow (250): default hug priority.
- fittingSizeLevel (50): recommended size priority when calling systemLayoutSizeFitting.
- Values of 1 ~ 999 map to the medium tier through LayoutStrength.fromPriority.
import { UINode, LayoutPriority, LayoutStrength, LayoutConstraintAxis } from "./build/vanilla.js";
const label = new UINode();
label.setContentCompressionResistancePriority(LayoutPriority.required, LayoutConstraintAxis.horizontal);
label.setContentHuggingPriority(LayoutPriority.defaultLow - 1, LayoutConstraintAxis.horizontal);
const strength = LayoutStrength.fromPriority(LayoutPriority.defaultHigh);
console.log(strength);표준 우선순위 상수.
Standard priority constants.
반환Returnsnumber
짝Counterpart: vanilla-engine LayoutPriority.REQUIRED
기본 압축 저항 우선순위. (750, UINode 의 압축 저항 기본값)
Default compression resistance priority. (750, the UINode compression resistance default)
반환Returnsnumber
짝Counterpart: vanilla-engine LayoutPriority.DEFAULT_HIGH
기본 hugging 우선순위. (250, UINode 의 hugging 기본값)
Default hugging priority. (250, the UINode hugging default)
반환Returnsnumber
짝Counterpart: vanilla-engine LayoutPriority.DEFAULT_LOW
맞춤 크기 우선순위. (50, UIKit 과 같은 값이고 엔진 안에서 쓰는 곳은 없다)
Fitting size priority. (50, the same value as UIKit, not used anywhere in the engine)
반환Returnsnumber
짝Counterpart: vanilla-engine LayoutPriority.FITTING_SIZE_LEVEL