LabelRepresentable( text: "To love the journey is to accept no such end. I have found, through painful experience, that the most important step a person can take is always the next one." ) .border(.red) .padding() } } PreviewͰͬͯΈΔ Ξ ͩΊͩʔ orz
ideal … max) (-1) - - 0 … 0 … ∞ x < 750 < 750 0 … x … ∞ x < 750 >= 750 0 … x … x x < 750 < 750 x … x … ∞ x >= 750 >= 750 x … x … x -1 = UIView.noIntrinsicMetric 750 = UILayoutPriority.defaultHigh
View { UIViewAdaptor { let view = UILabel() view.numberOfLines = 0 view.text = "To love the journey is to accept no such end. I have found, through painful experience, that the most important step a person can take is always the next one." return view } .padding() } } RepresentableKitͷհ UIViewRepresentableͷαΠζܭࢉΛநԽͯ͠ ΑΓ؆୯ʹ͑ΔΑ͏ʹϔϧύʔϥΠϒϥϦΛ ࡞Γ·ͨ͠ɻ https://github.com/yumemi-inc/RepresentableKit