From 6e679a9def510ec7d01dfc6069f831e9a9ffe5b5 Mon Sep 17 00:00:00 2001 From: Christopher Bowns <474+cbowns@users.noreply.github.com> Date: Mon, 3 Aug 2020 17:27:34 -0700 Subject: [PATCH 1/4] Update Tutorial2.md Argument order here has changed --- Documentation/Tutorials/Tutorial2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/Tutorials/Tutorial2.md b/Documentation/Tutorials/Tutorial2.md index 0544889f2..a9c964610 100644 --- a/Documentation/Tutorials/Tutorial2.md +++ b/Documentation/Tutorials/Tutorial2.md @@ -83,8 +83,8 @@ struct ReceiptElement: ProxyElement { label.color = .darkGray let inset = Inset( - wrapping: label, - uniformInset: 24.0) + uniformInset: 24.0, + wrapping: label) var scrollView = ScrollView(wrapping: inset) scrollView.contentSize = .fittingHeight // Stretches content to fill width, but sizes height to fit From 2e15cfbd733f4aa2b25bfa2b1aec7ea17a417780 Mon Sep 17 00:00:00 2001 From: Christopher Bowns <474+cbowns@users.noreply.github.com> Date: Mon, 3 Aug 2020 17:28:41 -0700 Subject: [PATCH 2/4] Update Tutorial2.md these are const labels --- Documentation/Tutorials/Tutorial2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/Tutorials/Tutorial2.md b/Documentation/Tutorials/Tutorial2.md index a9c964610..ab45f9ce4 100644 --- a/Documentation/Tutorials/Tutorial2.md +++ b/Documentation/Tutorials/Tutorial2.md @@ -201,14 +201,14 @@ struct LineItemElement: ProxyElement { row.horizontalUnderflow = .spaceEvenly - var titleLabel = Label(text: title) + let titleLabel = Label(text: title) row.add(child: titleLabel) let formatter = NumberFormatter() formatter.numberStyle = .currency let formattedPrice = formatter.string(from: NSNumber(value: price)) ?? "" - var priceLabel = Label(text: formattedPrice) + let priceLabel = Label(text: formattedPrice) row.add(child: priceLabel) } From 1863661ffdce43e5aba0c7ddfd245a19a5019dd6 Mon Sep 17 00:00:00 2001 From: Christopher Bowns <474+cbowns@users.noreply.github.com> Date: Mon, 3 Aug 2020 17:33:30 -0700 Subject: [PATCH 3/4] Update Tutorial2.md Get the rest of the uniformOffset position changes --- Documentation/Tutorials/Tutorial2.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/Tutorials/Tutorial2.md b/Documentation/Tutorials/Tutorial2.md index ab45f9ce4..34dbd80f4 100644 --- a/Documentation/Tutorials/Tutorial2.md +++ b/Documentation/Tutorials/Tutorial2.md @@ -273,8 +273,8 @@ struct ReceiptElement: ProxyElement { } let inset = Inset( - wrapping: column, - uniformInset: 24.0) + uniformInset: 24.0, + wrapping: column) var scrollView = ScrollView(wrapping: inset) scrollView.contentSize = .fittingHeight @@ -316,8 +316,8 @@ struct ReceiptElement: ProxyElement { } let inset = Inset( - wrapping: column, - uniformInset: 24.0) + uniformInset: 24.0, + wrapping: column) var scrollView = ScrollView(wrapping: inset) scrollView.contentSize = .fittingHeight @@ -374,8 +374,8 @@ struct ReceiptElement: ProxyElement { } let inset = Inset( - wrapping: column, - uniformInset: 24.0) + uniformInset: 24.0, + wrapping: column) var scrollView = ScrollView(wrapping: inset) scrollView.contentSize = .fittingHeight @@ -568,8 +568,8 @@ struct ReceiptElement: ProxyElement { } let inset = Inset( - wrapping: column, - uniformInset: 24.0) + uniformInset: 24.0, + wrapping: column) var scrollView = ScrollView(wrapping: inset) scrollView.contentSize = .fittingHeight From c297217d5c5b794788bc18dca6db48cf4529b3bc Mon Sep 17 00:00:00 2001 From: Christopher Bowns <474+cbowns@users.noreply.github.com> Date: Mon, 3 Aug 2020 17:38:51 -0700 Subject: [PATCH 4/4] Update Tutorial2.md these have flipped --- Documentation/Tutorials/Tutorial2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/Tutorials/Tutorial2.md b/Documentation/Tutorials/Tutorial2.md index 34dbd80f4..d8cfe47e9 100644 --- a/Documentation/Tutorials/Tutorial2.md +++ b/Documentation/Tutorials/Tutorial2.md @@ -399,8 +399,8 @@ import BlueprintUICommonControls struct RuleElement: ProxyElement { var elementRepresentation: Element { return ConstrainedSize( - wrapping: Box(backgroundColor: .black), - height: .absolute(1.0)) + height: .absolute(1.0), + wrapping: Box(backgroundColor: .black)) } } ```