Skip to content

Commit cb4ee7c

Browse files
committed
1.1.0
1 parent 22482ae commit cb4ee7c

File tree

4 files changed

+35
-11
lines changed

4 files changed

+35
-11
lines changed

Example/Example.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@
300300
"INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES;
301301
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault;
302302
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
303-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
304-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
303+
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
304+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
305305
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
306306
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
307307
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
@@ -338,8 +338,8 @@
338338
"INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES;
339339
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault;
340340
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
341-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
342-
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
341+
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
342+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
343343
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
344344
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
345345
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";

Example/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Example/ContentView.swift

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ struct ContentView: View {
1818
VStack(spacing: 48) {
1919
Text("Ignition")
2020
.font(.title.bold())
21-
.frame(height: 30, alignment: .center)
2221

2322
Text("Schedule Driven")
2423
.foregroundColor(.secondary)
2524
.font(.headline)
26-
.frame(height: 50, alignment: .center)
2725

2826
VStack(spacing: 4) {
2927
Text("Event Driven")
@@ -38,7 +36,6 @@ struct ContentView: View {
3836
}
3937
.buttonStyle(.plain)
4038
}
41-
.frame(height: 50, alignment: .center)
4239
}
4340

4441
makeEffectPair(
@@ -94,6 +91,17 @@ struct ContentView: View {
9491
)
9592
)
9693
.foregroundColor(.red)
94+
95+
makeEffectPair(
96+
name: "Custom",
97+
shape: RoundedRectangle(cornerRadius: 4),
98+
effect: CustomViewEffect { configuration in
99+
configuration.content
100+
.saturation(1 - configuration.progress)
101+
},
102+
animation: .default
103+
)
104+
.foregroundColor(.orange)
97105
}
98106
.padding(24)
99107
}
@@ -112,7 +120,6 @@ struct ContentView: View {
112120
Text(name)
113121
.font(.headline)
114122
.foregroundColor(.secondary)
115-
.frame(height: 30, alignment: .center)
116123

117124
shape
118125
.frame(width: 50, height: 50)
@@ -135,6 +142,23 @@ struct ContentView: View {
135142
}
136143
}
137144

145+
146+
struct CustomViewEffect<Content: View>: ViewEffect {
147+
148+
var content: (Configuration) -> Content
149+
150+
init(
151+
@ViewBuilder content: @escaping (Configuration) -> Content
152+
) {
153+
self.content = content
154+
}
155+
156+
func makeBody(configuration: Configuration) -> some View {
157+
content(configuration)
158+
}
159+
}
160+
161+
138162
struct ContentView_Previews: PreviewProvider {
139163
static var previews: some View {
140164
ContentView()

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let package = Package(
1919
),
2020
],
2121
dependencies: [
22-
.package(url: "https://github.com/nathantannar4/Engine", from: "1.0.0"),
22+
.package(url: "https://github.com/nathantannar4/Engine", from: "1.8.3"),
2323
],
2424
targets: [
2525
.target(

0 commit comments

Comments
 (0)