Skip to content

Commit

Permalink
Update Playground
Browse files Browse the repository at this point in the history
  • Loading branch information
ra1028 committed Aug 21, 2018
1 parent 672c964 commit 8f9affd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions DifferenceKit.playground/Contents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ PlaygroundPage.current.needsIndefiniteExecution = true
PlaygroundPage.current.liveView = navigationController.view

let source = [
Section(model: "Section 1", elements: ["A", "B", "C"]),
Section(model: "Section 2", elements: ["D", "E", "F"]),
Section(model: "Section 3", elements: ["G", "H", "I"]),
Section(model: "Section 4", elements: ["J", "K", "L"])
ArraySection(model: "Section 1", elements: ["A", "B", "C"]),
ArraySection(model: "Section 2", elements: ["D", "E", "F"]),
ArraySection(model: "Section 3", elements: ["G", "H", "I"]),
ArraySection(model: "Section 4", elements: ["J", "K", "L"])
]

let target = [
Section(model: "Section 5", elements: ["M", "N", "O"]),
Section(model: "Section 1", elements: ["A", "C"]),
Section(model: "Section 4", elements: ["J", "I", "K", "L"]),
Section(model: "Section 3", elements: ["G", "H", "Z"]),
Section(model: "Section 6", elements: ["P", "Q", "R"]),
ArraySection(model: "Section 5", elements: ["M", "N", "O"]),
ArraySection(model: "Section 1", elements: ["A", "C"]),
ArraySection(model: "Section 4", elements: ["J", "I", "K", "L"]),
ArraySection(model: "Section 3", elements: ["G", "H", "Z"]),
ArraySection(model: "Section 6", elements: ["P", "Q", "R"])
]

viewController.dataInput = source
Expand Down
4 changes: 2 additions & 2 deletions DifferenceKit.playground/Sources/TableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extension String: Differentiable {}
public final class TableViewController: UITableViewController {
public var refreshAction: (() -> Void)?

public var dataInput: [Section<String, String>] {
public var dataInput: [ArraySection<String, String>] {
get { return data }
set {
let changeset = StagedChangeset(source: data, target: newValue)
Expand All @@ -16,7 +16,7 @@ public final class TableViewController: UITableViewController {
}
}

private var data = [Section<String, String>]()
private var data = [ArraySection<String, String>]()

public init() {
super.init(style: .grouped)
Expand Down

0 comments on commit 8f9affd

Please sign in to comment.