-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts out the fixes from #517, since it breaks our KIF tests in POS. I missed this previously due to test selection. I've also added a testing VC to iterate on this more.
- Loading branch information
Showing
6 changed files
with
56 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
Demo/Sources/Demos/Demo Screens/AnimatedReuseViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// AnimatedReuseViewController.swift | ||
// Demo | ||
// | ||
// Created by Kyle Van Essen on 8/9/24. | ||
// Copyright © 2024 Kyle Van Essen. All rights reserved. | ||
// | ||
|
||
import BlueprintUILists | ||
import BlueprintUICommonControls | ||
|
||
|
||
final class AnimatedReuseViewController : ListViewController { | ||
|
||
|
||
override func configure(list: inout ListProperties) { | ||
|
||
list.add { | ||
Section("items") { | ||
for row in 1...1000 { | ||
ToggleRow(isOn: .random(), identifierValue: row) | ||
} | ||
} | ||
} | ||
} | ||
|
||
private struct ToggleRow : BlueprintItemContent, Equatable { | ||
|
||
var isOn: Bool | ||
var identifierValue: AnyHashable | ||
|
||
func element(with info: ApplyItemContentInfo) -> any Element { | ||
Toggle(isOn: isOn) { _ in } | ||
.centered() | ||
.inset(uniform: 10) | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters