Skip to content

Commit c3ba809

Browse files
CypherPoetCypherPoet
CypherPoet
authored and
CypherPoet
committed
Complete Day 67
1 parent 99325ce commit c3ba809

File tree

5 files changed

+71
-5
lines changed

5 files changed

+71
-5
lines changed

README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ I'm currently seeking freelance, remote opportunities as an iOS developer! If yo
7171
- **Day 62:** [_Project 13: Instafilter_ (Part One)](./day-062/)
7272
- **Day 63:** [_Project 13: Instafilter_ (Part Two)](./day-063/)
7373
- **Day 64:** [_Project 13: Instafilter_ (Part Three)](./day-064/)
74+
- **Day 65:** [_Project 13: Instafilter_ (Part Four)](./day-065/)
75+
- **Day 66:** [_Project 13: Instafilter_ (Part Five)](./day-066/)
7476

7577
</details>
7678

77-
- **Day 65:** [_Project 13: Instafilter_ (Part Four)](./day-065/)
79+
- **Day 67:** [_Project 13: Instafilter_ (Part Six)](./day-067/)
7880

7981

8082

@@ -177,3 +179,10 @@ I'm currently seeking freelance, remote opportunities as an iOS developer! If yo
177179
<div style="text-align: center;">
178180
<img src="./day-060/Project/SpaceXPayloadStats/Screenshots/day-60-recording-1.gif" width="300px"/>
179181
</div>
182+
183+
184+
- [Project 13: Instafilter](./day-062/Projects/Instafilter/)
185+
186+
<div style="text-align: center;">
187+
<img src="./day-062/Projects/Instafilter/Screenshots/day-66-recording-1.gif" width="400px"/>
188+
</div>

day-062/Projects/Instafilter/Instafilter/Scenes/Filtering/ImageFilteringViewModel.swift

+2-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ extension ImageFilteringViewModel {
6161
private var intensitySliderPublisher: AnyPublisher<(filterKey: String, value: CGFloat), Never> {
6262
intensitySliderViewModel.$sliderValue
6363
.dropFirst()
64-
.print("intensitySliderPublisher")
6564
.debounce(for: .milliseconds(200), scheduler: DispatchQueue.main)
6665
.map { (filterKey: kCIInputIntensityKey, value: $0 * SliderMultiplier.intensity) }
6766
.eraseToAnyPublisher()
@@ -135,19 +134,18 @@ private extension ImageFilteringViewModel {
135134
receiveCompletion: { completion in
136135
switch completion {
137136
case .failure(let error):
138-
print("filteredImagePublisher error")
139137
switch error {
140138
case .cgImage(let message),
141139
.ciImage(let message),
142140
.filtering(let message):
143141
self.filteringErrorMessage = message
144142
}
145143
case .finished:
146-
print("filteredImagePublisher finished")
144+
break
147145
}
148146
},
149147
receiveValue: {
150-
print("filteredImagePublisher, received value: \($0)")
148+
// print("filteredImagePublisher, received value: \($0)")
151149
self.processedImage = $0
152150
}
153151
)
Loading
Binary file not shown.

day-067/README.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Day 67: _Project 13: Instafilter_ (Part Five)
2+
3+
_Follow along at https://www.hackingwithswift.com/100/swiftui/67_.
4+
5+
<br/>
6+
7+
8+
# 📒 Field Notes
9+
10+
This day covers Part Five of _`Project 13: Instafilter`_ in the [100 Days of SwiftUI Challenge](https://www.hackingwithswift.com/100/swiftui/67). (Project 13 files can be found in the [directory for Part One](../day-062/).)
11+
12+
13+
In addition to recapping the material covered during the project's other days, Day 67 focuses on extending the project according to a set of challenges.
14+
15+
<br/>
16+
17+
18+
# 🥅 Challenges
19+
20+
21+
## Challenge 1
22+
23+
> Try making the Save button show an error if there was no image in the image view.
24+
25+
26+
- 🔗 I [disabled it](https://github.com/CypherPoet/100-days-of-swiftui/blob/e508591135190e093a2cf105482d7ec63385e84a/day-062/Projects/Instafilter/Instafilter/Scenes/Filtering/ImageFilteringView.swift#L139) instead 😛.
27+
28+
29+
30+
## Challenge 2
31+
32+
> Make the Change Filter button change its title to show the name of the currently selected filter.
33+
34+
35+
- 🔗 Already Covered [in a similar manner](https://github.com/CypherPoet/100-days-of-swiftui/blob/e508591135190e093a2cf105482d7ec63385e84a/day-062/Projects/Instafilter/Instafilter/Scenes/Filtering/ImageFilteringView.swift#L45).
36+
37+
38+
39+
## Challenge 3
40+
41+
> Experiment with having more than one slider control each of the input keys you care about. For example, you might have one for radius and one for intensity.
42+
43+
44+
- 🔗 I ended up experimenting this as part of Day 66. I came up with a way to [dynamically render filter-appropriate sliders](https://github.com/CypherPoet/100-days-of-swiftui/blob/e508591135190e093a2cf105482d7ec63385e84a/day-062/Projects/Instafilter/Instafilter/Scenes/Filtering/ImageFilteringView.swift#L100) inside of a `ForEach` block.
45+
46+
47+
48+
49+
<br/>
50+
51+
52+
53+
# 📸 Screenshots
54+
55+
56+
<div style="text-align: center;">
57+
<img src="../day-062/Projects/Instafilter/Screenshots/day-66-recording-1.gif" width="400px"/>
58+
</div>
59+

0 commit comments

Comments
 (0)