Layout Element Properties
let node = ASDisplayNode()
node.style. .... // ASLayoutElementStyle
let element: ASLayoutElement = node
element.style. ... // ASLayoutElementStyle1. Texture Layout Element Properties에서 주로사용하는 property type 정리
// ASDimension Example
let point = ASDimension(unit: .points, value: 100.0)
let point2 = ASDimensionMake("100.0pt")
let fraction = ASDimension(unit: .fractions, value: 0.5) // 50%
let fraction2 = ASDimensionMake("50%") // 50%
// ASLayoutSize Example
let width = ASDimension(unit: .points, value: 100.0)
let height = ASDimension(unit: .points, value: 100.0)
let relativeSize = ASLayoutSize(width: width, height: height)
let width2 = ASDimension(unit: .fractions, value: 0.5)
let height2 = ASDimension(unit: .fractions, value: 0.5)
let relativeSize2 = ASLayoutSize(width: width, height: height)2. Basic Layout Element Properties
3. Stack Layout Element Properties (ASStackLayoutElement)
4. Absolute Layout Element Properties (ASAbsoluteLayoutElement)
Last updated
Was this helpful?