diff --git a/iOS/Sample/RootViewController.mm b/iOS/Sample/RootViewController.mm index 77b1ca25b..6fc025c5a 100644 --- a/iOS/Sample/RootViewController.mm +++ b/iOS/Sample/RootViewController.mm @@ -55,37 +55,28 @@ static CKComponent* componentForModel( id model, id context) { - return [CKBackgroundLayoutComponent - newWithComponent: - [CKFlexboxComponent newWithView:{} - size:{} - style:{} - children:{ - {[CKButtonComponent - newWithAction:nil - options:{ - .titles = @"Purple", - .titleColors = - UIColor.purpleColor, - }]}, - {[CKButtonComponent - newWithAction:nil - options:{ - .titles = @"Brown", - .titleColors = - UIColor.brownColor, - }]}, - {[CKButtonComponent - newWithAction:nil - options:{ - .titles = @"Cyan", - .titleColors = - UIColor.cyanColor, - }]}, - }] - background:CK::ImageComponentBuilder() - .image([UIImage imageNamed:@"sonarpattern"]) - .build()]; + return CK::BackgroundLayoutComponentBuilder() + .component(CK::FlexboxComponentBuilder() + .child({.component = CK::ButtonComponentBuilder() + .action(nil) + .title(@"Purple") + .titleColor(UIColor.purpleColor) + .build()}) + .child({.component = CK::ButtonComponentBuilder() + .action(nil) + .title(@"Brown") + .titleColor(UIColor.brownColor) + .build()}) + .child({.component = CK::ButtonComponentBuilder() + .action(nil) + .title(@"Cyan") + .titleColor(UIColor.cyanColor) + .build()}) + .build()) + .background(CK::ImageComponentBuilder() + .image([UIImage imageNamed:@"sonarpattern"]) + .build()) + .build(); } @end