Skip to content

Commit c993963

Browse files
authored
Merge pull request #16 from sideeffect-io/feature/binding-sample
Feature/binding sample
2 parents f8c7b1c + 78e4515 commit c993963

26 files changed

Lines changed: 1191 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
strategy:
3838
matrix:
39-
project: [TaskTracker]
39+
project: [TaskTracker, SearchApis]
4040
steps:
4141
- name: Checkout branch
4242
uses: actions/checkout@v3

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,12 @@ Allows to create a SwiftUI binding on a property of the current state, sending a
382382

383383
```swift
384384
self.viewStateMachine.binding(keypath: \.persons, send: .closeButtonWasPressed)
385+
```
386+
387+
Allows to create a SwiftUI binding on a property of the current state, sending an Event when the binding changes, debounced with the specified dueTime.
388+
389+
```swift
390+
self.viewStateMachine.binding(keypath: \.persons, send: .closeButtonWasPressed).debounce(for: .seconds(1))
385391
```
386392
</details>
387393

Samples/SearchApis/SearchApis.xcodeproj/project.pbxproj

Lines changed: 583 additions & 0 deletions
Large diffs are not rendered by default.

Samples/SearchApis/SearchApis.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Samples/SearchApis/SearchApis.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1340"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "1A7BD82028B277530070786F"
18+
BuildableName = "SearchApis.app"
19+
BlueprintName = "SearchApis"
20+
ReferencedContainer = "container:SearchApis.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "NO">
30+
<EnvironmentVariables>
31+
<EnvironmentVariable
32+
key = "IS_UNIT_TESTING"
33+
value = "1"
34+
isEnabled = "YES">
35+
</EnvironmentVariable>
36+
</EnvironmentVariables>
37+
<Testables>
38+
<TestableReference
39+
skipped = "NO">
40+
<BuildableReference
41+
BuildableIdentifier = "primary"
42+
BlueprintIdentifier = "1A7BD85628B2B0CD0070786F"
43+
BuildableName = "SearchApisTests.xctest"
44+
BlueprintName = "SearchApisTests"
45+
ReferencedContainer = "container:SearchApis.xcodeproj">
46+
</BuildableReference>
47+
</TestableReference>
48+
</Testables>
49+
</TestAction>
50+
<LaunchAction
51+
buildConfiguration = "Debug"
52+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
53+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
54+
launchStyle = "0"
55+
useCustomWorkingDirectory = "NO"
56+
ignoresPersistentStateOnLaunch = "NO"
57+
debugDocumentVersioning = "YES"
58+
debugServiceExtension = "internal"
59+
allowLocationSimulation = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "1A7BD82028B277530070786F"
65+
BuildableName = "SearchApis.app"
66+
BlueprintName = "SearchApis"
67+
ReferencedContainer = "container:SearchApis.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</LaunchAction>
71+
<ProfileAction
72+
buildConfiguration = "Release"
73+
shouldUseLaunchSchemeArgsEnv = "YES"
74+
savedToolIdentifier = ""
75+
useCustomWorkingDirectory = "NO"
76+
debugDocumentVersioning = "YES">
77+
<BuildableProductRunnable
78+
runnableDebuggingMode = "0">
79+
<BuildableReference
80+
BuildableIdentifier = "primary"
81+
BlueprintIdentifier = "1A7BD82028B277530070786F"
82+
BuildableName = "SearchApis.app"
83+
BlueprintName = "SearchApis"
84+
ReferencedContainer = "container:SearchApis.xcodeproj">
85+
</BuildableReference>
86+
</BuildableProductRunnable>
87+
</ProfileAction>
88+
<AnalyzeAction
89+
buildConfiguration = "Debug">
90+
</AnalyzeAction>
91+
<ArchiveAction
92+
buildConfiguration = "Release"
93+
revealArchiveInOrganizer = "YES">
94+
</ArchiveAction>
95+
</Scheme>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"scale" : "2x",
6+
"size" : "20x20"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"scale" : "3x",
11+
"size" : "20x20"
12+
},
13+
{
14+
"idiom" : "iphone",
15+
"scale" : "2x",
16+
"size" : "29x29"
17+
},
18+
{
19+
"idiom" : "iphone",
20+
"scale" : "3x",
21+
"size" : "29x29"
22+
},
23+
{
24+
"idiom" : "iphone",
25+
"scale" : "2x",
26+
"size" : "40x40"
27+
},
28+
{
29+
"idiom" : "iphone",
30+
"scale" : "3x",
31+
"size" : "40x40"
32+
},
33+
{
34+
"idiom" : "iphone",
35+
"scale" : "2x",
36+
"size" : "60x60"
37+
},
38+
{
39+
"idiom" : "iphone",
40+
"scale" : "3x",
41+
"size" : "60x60"
42+
},
43+
{
44+
"idiom" : "ipad",
45+
"scale" : "1x",
46+
"size" : "20x20"
47+
},
48+
{
49+
"idiom" : "ipad",
50+
"scale" : "2x",
51+
"size" : "20x20"
52+
},
53+
{
54+
"idiom" : "ipad",
55+
"scale" : "1x",
56+
"size" : "29x29"
57+
},
58+
{
59+
"idiom" : "ipad",
60+
"scale" : "2x",
61+
"size" : "29x29"
62+
},
63+
{
64+
"idiom" : "ipad",
65+
"scale" : "1x",
66+
"size" : "40x40"
67+
},
68+
{
69+
"idiom" : "ipad",
70+
"scale" : "2x",
71+
"size" : "40x40"
72+
},
73+
{
74+
"idiom" : "ipad",
75+
"scale" : "2x",
76+
"size" : "76x76"
77+
},
78+
{
79+
"idiom" : "ipad",
80+
"scale" : "2x",
81+
"size" : "83.5x83.5"
82+
},
83+
{
84+
"idiom" : "ios-marketing",
85+
"scale" : "1x",
86+
"size" : "1024x1024"
87+
}
88+
],
89+
"info" : {
90+
"author" : "xcode",
91+
"version" : 1
92+
}
93+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}

0 commit comments

Comments
 (0)