Live preview
To make it work with live preview you need to specify either all styles or exact autolayout's one
With all app styles included
class Welcome_Preview: WebPreview {
override class var title: String { "Initial page" } // optional
override class var width: UInt { 440 } // optional
override class var height: UInt { 480 } // optional
@Preview override class var content: Preview.Content {
// add styles if needed
AppStyles.all
// add here as many elements as needed
WelcomeViewController()
}
}
With exact app styles including autoalyout's one
class Welcome_Preview: WebPreview {
override class var title: String { "Initial page" } // optional
override class var width: UInt { 440 } // optional
override class var height: UInt { 480 } // optional
@Preview override class var content: Preview.Content {
// add styles if needed
AppStyles.id(.mainStyle)
AppStyles.id(.autolayoutStyles)
// add here as many elements as needed
WelcomeViewController()
}
}