Skip to content

Commit

Permalink
Remove initial background view
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteio authored and whiteio committed Nov 27, 2023
1 parent dabc5b1 commit 0df1aaa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 55 deletions.
4 changes: 0 additions & 4 deletions ImageEraser.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
E3B5307128BEA77100F33E07 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E3B5307028BEA77100F33E07 /* Assets.xcassets */; };
E3B5307428BEA77100F33E07 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E3B5307328BEA77100F33E07 /* Preview Assets.xcassets */; };
E3B5308028BEAB1100F33E07 /* button.riv in Resources */ = {isa = PBXBuildFile; fileRef = E3B5307F28BEAB1100F33E07 /* button.riv */; };
E3E486652A65D74500D78C9F /* SplashscreenPlaceholderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3E486642A65D74500D78C9F /* SplashscreenPlaceholderView.swift */; };
E3E486672A65D76400D78C9F /* SelectContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3E486662A65D76400D78C9F /* SelectContentView.swift */; };
E3E486692A65D77700D78C9F /* MainScreenBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3E486682A65D77700D78C9F /* MainScreenBackgroundView.swift */; };
E3E4866B2A65D78B00D78C9F /* Polygon.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3E4866A2A65D78B00D78C9F /* Polygon.swift */; };
Expand Down Expand Up @@ -84,7 +83,6 @@
E3B5307328BEA77100F33E07 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
E3B5307F28BEAB1100F33E07 /* button.riv */ = {isa = PBXFileReference; lastKnownFileType = file; path = button.riv; sourceTree = "<group>"; };
E3D2B6552A38DB240088B7EF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E3E486642A65D74500D78C9F /* SplashscreenPlaceholderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashscreenPlaceholderView.swift; sourceTree = "<group>"; };
E3E486662A65D76400D78C9F /* SelectContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectContentView.swift; sourceTree = "<group>"; };
E3E486682A65D77700D78C9F /* MainScreenBackgroundView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainScreenBackgroundView.swift; sourceTree = "<group>"; };
E3E4866A2A65D78B00D78C9F /* Polygon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Polygon.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -151,7 +149,6 @@
children = (
E3B5306E28BEA76F00F33E07 /* ContentView.swift */,
E35232E128C4A81B008DB14B /* SplashscreenContentView.swift */,
E3E486642A65D74500D78C9F /* SplashscreenPlaceholderView.swift */,
E3E486662A65D76400D78C9F /* SelectContentView.swift */,
E3E486682A65D77700D78C9F /* MainScreenBackgroundView.swift */,
E3E4866C2A65D79B00D78C9F /* ActionView.swift */,
Expand Down Expand Up @@ -388,7 +385,6 @@
E3A9404828E9F99000FC7801 /* AlwaysPopoverModifier.swift in Sources */,
E399DDDC28F4C08B00F07C25 /* ShareableImage.swift in Sources */,
E35232D928C4A451008DB14B /* NavigationStore.swift in Sources */,
E3E486652A65D74500D78C9F /* SplashscreenPlaceholderView.swift in Sources */,
E35232F728C4B87A008DB14B /* SegmentConfiguration.swift in Sources */,
E3E4866B2A65D78B00D78C9F /* Polygon.swift in Sources */,
E399DDD628F4B53000F07C25 /* StateProtocols.swift in Sources */,
Expand Down
47 changes: 21 additions & 26 deletions ImageEraser/Views/Landing/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,33 @@ import SwiftUI

struct ContentView: View {
@Bindable var navigationStore: NavigationStore
@State var hasAppeared = false
@Namespace var namespace

var body: some View {
if hasAppeared {
NavigationStack(path: $navigationStore.paths) {
VStack {
ActionView()
NavigationStack(path: $navigationStore.paths) {
VStack {
ActionView()
.environment(navigationStore)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(MainScreenBackgroundView())
.background(
Image("Spline")
.blur(radius: 50)
.offset(x: 200, y: 100))
.navigationDestination(for: Route.self) { route in
switch route {
case .editPhoto(let photoData):
let extractedExpr = EditViewModel()
EditView(photoData: photoData)
.environment(extractedExpr)
.environment(navigationStore)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(MainScreenBackgroundView())
.background(
Image("Spline")
.blur(radius: 50)
.offset(x: 200, y: 100))
.navigationDestination(for: Route.self) { route in
switch route {
case .editPhoto(let photoData):
let extractedExpr = EditViewModel()
EditView(photoData: photoData)
.environment(extractedExpr)
.environment(navigationStore)
}
}
.background(
Color("MainBackgroundColor")
.matchedGeometryEffect(id: "background", in: namespace))
.ignoresSafeArea()
}
} else {
SplashscreenPlaceholderView(namespace: namespace, hasAppeared: $hasAppeared)
.background(
Color("MainBackgroundColor")
.matchedGeometryEffect(id: "background", in: namespace))
.ignoresSafeArea()
}
}
}
Expand Down
25 changes: 0 additions & 25 deletions ImageEraser/Views/Landing/SplashscreenPlaceholderView.swift

This file was deleted.

0 comments on commit 0df1aaa

Please sign in to comment.