mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-24 18:31:41 +01:00
minor fix in demo app
This commit is contained in:
@@ -313,6 +313,7 @@ class ListObserverDemoViewController: UITableViewController, ListSectionObserver
|
|||||||
|
|
||||||
@IBAction private dynamic func shuffleBarButtonItemTouched(_ sender: AnyObject?) {
|
@IBAction private dynamic func shuffleBarButtonItemTouched(_ sender: AnyObject?) {
|
||||||
|
|
||||||
|
self.setTable(enabled: false)
|
||||||
ColorsDemo.stack.perform(
|
ColorsDemo.stack.perform(
|
||||||
asynchronous: { (transaction) in
|
asynchronous: { (transaction) in
|
||||||
|
|
||||||
@@ -322,12 +323,16 @@ class ListObserverDemoViewController: UITableViewController, ListSectionObserver
|
|||||||
palette.colorName .= nil
|
palette.colorName .= nil
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
completion: { _ in }
|
completion: { _ in
|
||||||
|
|
||||||
|
self.setTable(enabled: true)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func setTable(enabled: Bool) {
|
private func setTable(enabled: Bool) {
|
||||||
|
|
||||||
|
tableView.isUserInteractionEnabled = enabled
|
||||||
UIView.animate(
|
UIView.animate(
|
||||||
withDuration: 0.2,
|
withDuration: 0.2,
|
||||||
delay: 0,
|
delay: 0,
|
||||||
@@ -337,7 +342,6 @@ class ListObserverDemoViewController: UITableViewController, ListSectionObserver
|
|||||||
if let tableView = self.tableView {
|
if let tableView = self.tableView {
|
||||||
|
|
||||||
tableView.alpha = enabled ? 1.0 : 0.5
|
tableView.alpha = enabled ? 1.0 : 0.5
|
||||||
tableView.isUserInteractionEnabled = enabled
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
completion: nil
|
completion: nil
|
||||||
|
|||||||
Reference in New Issue
Block a user