mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
23 lines
561 B
Swift
23 lines
561 B
Swift
import LayoutKit
|
|
import LayoutKitPlayground
|
|
import PlaygroundSupport
|
|
import UIKit
|
|
import VGSL
|
|
|
|
private func createBlock() throws -> Block {
|
|
try ContainerBlock(
|
|
layoutDirection: .vertical,
|
|
horizontalChildrenAlignment: .center,
|
|
verticalChildrenAlignment: .center,
|
|
children: [
|
|
ImageBlock(
|
|
imageHolder: UIImage(named: "ferrari_F40_front.jpg")!,
|
|
widthTrait: .fixed(300.0),
|
|
heightTrait: .fixed(200.0)
|
|
),
|
|
]
|
|
)
|
|
}
|
|
|
|
PlaygroundPage.current.liveView = LayoutKitPlaygroundViewController(blockProvider: createBlock)
|