Skip to content

Commit a1836ce

Browse files
CypherPoetCypherPoet
CypherPoet
authored and
CypherPoet
committed
Complete Day 63
1 parent 7106079 commit a1836ce

18 files changed

+108
-4
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ I'm currently seeking freelance, remote opportunities as an iOS developer! If yo
6868
- **Day 59:** [_Project 12: Core Data_ (Part Three)](./day-059/)
6969
- **Day 60:** [Milestone for Projects 10-12 (Part One)](./day-060/)
7070
- **Day 61:** [Milestone for Projects 10-12 (Part Two)](./day-061/)
71+
- **Day 62:** [_Project 13: Instafilter_ (Part One)](./day-062/)
7172

7273
</details>
7374

74-
- **Day 62:** [_Project 13: Instafilter_ (Part One)](./day-062/)
75+
- **Day 63:** [_Project 13: Instafilter_ (Part Two)](./day-063/)
7576

7677

7778

day-062/Projects/Instafilter/Instafilter.xcodeproj/project.pbxproj

+12
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
F329952E23908BD400D2D963 /* ImageFilteringView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F329952D23908BD400D2D963 /* ImageFilteringView.swift */; };
1111
F329953023908CB500D2D963 /* ImageFilteringViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F329952F23908CB500D2D963 /* ImageFilteringViewModel.swift */; };
1212
F32995322390C29100D2D963 /* ImageFilteringContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F32995312390C29100D2D963 /* ImageFilteringContainerView.swift */; };
13+
F3299535239181A900D2D963 /* UIImagePickerWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3299534239181A900D2D963 /* UIImagePickerWrapper.swift */; };
1314
F352424E238F3F18009DF1F9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F352424D238F3F18009DF1F9 /* AppDelegate.swift */; };
1415
F3524250238F3F18009DF1F9 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F352424F238F3F18009DF1F9 /* SceneDelegate.swift */; };
1516
F3524254238F3F19009DF1F9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F3524253238F3F19009DF1F9 /* Assets.xcassets */; };
@@ -24,6 +25,7 @@
2425
F329952D23908BD400D2D963 /* ImageFilteringView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageFilteringView.swift; sourceTree = "<group>"; };
2526
F329952F23908CB500D2D963 /* ImageFilteringViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageFilteringViewModel.swift; sourceTree = "<group>"; };
2627
F32995312390C29100D2D963 /* ImageFilteringContainerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageFilteringContainerView.swift; sourceTree = "<group>"; };
28+
F3299534239181A900D2D963 /* UIImagePickerWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImagePickerWrapper.swift; sourceTree = "<group>"; };
2729
F352424A238F3F18009DF1F9 /* Instafilter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Instafilter.app; sourceTree = BUILT_PRODUCTS_DIR; };
2830
F352424D238F3F18009DF1F9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2931
F352424F238F3F18009DF1F9 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
@@ -47,6 +49,14 @@
4749
/* End PBXFrameworksBuildPhase section */
4850

4951
/* Begin PBXGroup section */
52+
F32995332391817800D2D963 /* Views */ = {
53+
isa = PBXGroup;
54+
children = (
55+
F3299534239181A900D2D963 /* UIImagePickerWrapper.swift */,
56+
);
57+
path = Views;
58+
sourceTree = "<group>";
59+
};
5060
F3524241238F3F18009DF1F9 = {
5161
isa = PBXGroup;
5262
children = (
@@ -100,6 +110,7 @@
100110
F3524262238F45CD009DF1F9 /* Reusables */ = {
101111
isa = PBXGroup;
102112
children = (
113+
F32995332391817800D2D963 /* Views */,
103114
F3F566AE238F6556009E1FB0 /* ImageFilteringService.swift */,
104115
);
105116
path = Reusables;
@@ -211,6 +222,7 @@
211222
F32995322390C29100D2D963 /* ImageFilteringContainerView.swift in Sources */,
212223
F352424E238F3F18009DF1F9 /* AppDelegate.swift in Sources */,
213224
F329953023908CB500D2D963 /* ImageFilteringViewModel.swift in Sources */,
225+
F3299535239181A900D2D963 /* UIImagePickerWrapper.swift in Sources */,
214226
F3524250238F3F18009DF1F9 /* SceneDelegate.swift in Sources */,
215227
F3F566B6238F6A48009E1FB0 /* AppState.swift in Sources */,
216228
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"object": {
3+
"pins": [
4+
{
5+
"package": "CypherPoetSwiftUIKit",
6+
"repositoryURL": "https://github.com/CypherPoet/CypherPoetSwiftUIKit.git",
7+
"state": {
8+
"branch": null,
9+
"revision": "7058b7216750930639499ad167af1f4665ca91eb",
10+
"version": "0.0.23"
11+
}
12+
}
13+
]
14+
},
15+
"version": 1
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
//
2+
// UIImagePickerWrapper.swift
3+
// Instafilter
4+
//
5+
// Created by CypherPoet on 11/29/19.
6+
// ✌️
7+
//
8+
9+
import SwiftUI
10+
11+
12+
struct UIImagePickerWrapper {
13+
typealias UIViewControllerType = UIImagePickerController
14+
15+
16+
}
17+
18+
19+
// MARK: - UIViewControllerRepresentable
20+
extension UIImagePickerWrapper: UIViewControllerRepresentable {
21+
22+
func makeUIViewController(
23+
context: UIViewControllerRepresentableContext<UIImagePickerWrapper>
24+
) -> UIImagePickerController {
25+
UIImagePickerController()
26+
}
27+
28+
29+
30+
func updateUIViewController(
31+
_ imagePickerController: UIImagePickerController,
32+
context: UIViewControllerRepresentableContext<UIImagePickerWrapper>
33+
) {
34+
35+
}
36+
}
37+
38+
39+
40+
41+
// MARK: - Preview
42+
struct UIImagePickerWrapper_Previews: PreviewProvider {
43+
44+
static var previews: some View {
45+
UIImagePickerWrapper()
46+
}
47+
}

day-062/Projects/Instafilter/Instafilter/Scenes/ImageFilteringContainerView.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import SwiftUI
1111

1212
struct ImageFilteringContainerView: View {
1313
@State private var currentInputImage: UIImage? = nil
14+
@State private var isShowingImagePicker = false
1415
}
1516

1617

@@ -28,6 +29,9 @@ extension ImageFilteringContainerView {
2829

2930
Spacer()
3031
}
32+
.sheet(isPresented: $isShowingImagePicker) {
33+
UIImagePickerWrapper()
34+
}
3135
}
3236
}
3337

@@ -55,7 +59,7 @@ extension ImageFilteringContainerView {
5559

5660
private var imagePickerButton: some View {
5761
Button(action: {
58-
self.selectImage()
62+
self.isShowingImagePicker = true
5963
}) {
6064
Image(systemName: "camera.fill")
6165
.renderingMode(.original)
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Binary file not shown.

day-062/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ struct ContentView: View {
8181
```
8282

8383

84-
85-
8684
## Showing multiple options with ActionSheet
8785

8886
While visually distinct, `ActionSheet`s are alot like `Alert`s with respect to the way we declare them as a modifier on a SwiftUI View.

day-063/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Day 63: _Project 13: Instafilter_ (Part Two)
2+
3+
_Follow along at https://www.hackingwithswift.com/100/swiftui/63_.
4+
5+
<br/>
6+
7+
8+
# 📒 Field Notes
9+
10+
This day covers Part Two of _`Project 13: Instafilter`_ in the [100 Days of SwiftUI Challenge](https://www.hackingwithswift.com/100/swiftui/63). (Project 13 files can be found in the [directory for Part One](../day-062/).)
11+
12+
13+
It focuses on several specific topics:
14+
15+
- Integrating Core Image with SwiftUI
16+
- Wrapping a UIViewController in a SwiftUI view
17+
18+
19+
20+
<div style="text-align: center;">
21+
<img src="../day-062/Projects/Instafilter/Screenshots/day-63-recording-1.gif" width="400px"/>
22+
</div>
23+
24+
25+
26+
<br/>

0 commit comments

Comments
 (0)