Skip to content

Commit

Permalink
Merge pull request #130 from cbowns/patch-2
Browse files Browse the repository at this point in the history
Update Tutorial2.md
  • Loading branch information
bencochran authored Aug 4, 2020
2 parents 759d5b8 + c297217 commit 7d0697a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions Documentation/Tutorials/Tutorial2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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))
}
}
```
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7d0697a

Please sign in to comment.