Skip to content

Commit

Permalink
feat: update inline mode & test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeonhui committed Mar 12, 2024
1 parent 67727eb commit b401a54
Show file tree
Hide file tree
Showing 12 changed files with 308 additions and 66 deletions.
79 changes: 79 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/FittedSheetsSwiftUI.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FittedSheetsSwiftUI"
BuildableName = "FittedSheetsSwiftUI"
BlueprintName = "FittedSheetsSwiftUI"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FittedSheetsSwiftUITests"
BuildableName = "FittedSheetsSwiftUITests"
BlueprintName = "FittedSheetsSwiftUITests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FittedSheetsSwiftUI"
BuildableName = "FittedSheetsSwiftUI"
BlueprintName = "FittedSheetsSwiftUI"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FittedSheetsSwiftUITests"
BuildableName = "FittedSheetsSwiftUITests"
BlueprintName = "FittedSheetsSwiftUITests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
objects = {

/* Begin PBXBuildFile section */
A5A48EAD2A8E028200E9F2BD /* FittedSheetsSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = A5A48EAC2A8E028200E9F2BD /* FittedSheetsSwiftUI */; };
A59174732BA0A3E500ECD2BD /* FittedSheetsSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = A59174722BA0A3E500ECD2BD /* FittedSheetsSwiftUI */; };
A59174752BA0A41B00ECD2BD /* InlineContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A59174742BA0A41B00ECD2BD /* InlineContentView.swift */; };
A5DD248A2A8DF27E00EF7364 /* FittedSheet_SwiftUI_ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5DD24892A8DF27E00EF7364 /* FittedSheet_SwiftUI_ExampleApp.swift */; };
A5DD248C2A8DF27E00EF7364 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5DD248B2A8DF27E00EF7364 /* ContentView.swift */; };
A5DD248E2A8DF27F00EF7364 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A5DD248D2A8DF27F00EF7364 /* Assets.xcassets */; };
A5DD24912A8DF27F00EF7364 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A5DD24902A8DF27F00EF7364 /* Preview Assets.xcassets */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
A59174702BA0A3D600ECD2BD /* FitttedSheets-SwiftUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "FitttedSheets-SwiftUI"; path = ..; sourceTree = "<group>"; };
A59174742BA0A41B00ECD2BD /* InlineContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InlineContentView.swift; sourceTree = "<group>"; };
A5DD24862A8DF27E00EF7364 /* FittedSheet-SwiftUI-Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "FittedSheet-SwiftUI-Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
A5DD24892A8DF27E00EF7364 /* FittedSheet_SwiftUI_ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FittedSheet_SwiftUI_ExampleApp.swift; sourceTree = "<group>"; };
A5DD248B2A8DF27E00EF7364 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
Expand All @@ -27,18 +30,27 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A5A48EAD2A8E028200E9F2BD /* FittedSheetsSwiftUI in Frameworks */,
A59174732BA0A3E500ECD2BD /* FittedSheetsSwiftUI in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
A59174712BA0A3E500ECD2BD /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
A5DD247D2A8DF27E00EF7364 = {
isa = PBXGroup;
children = (
A59174702BA0A3D600ECD2BD /* FitttedSheets-SwiftUI */,
A5DD24882A8DF27E00EF7364 /* FittedSheet-SwiftUI-Example */,
A5DD24872A8DF27E00EF7364 /* Products */,
A59174712BA0A3E500ECD2BD /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -55,6 +67,7 @@
children = (
A5DD24892A8DF27E00EF7364 /* FittedSheet_SwiftUI_ExampleApp.swift */,
A5DD248B2A8DF27E00EF7364 /* ContentView.swift */,
A59174742BA0A41B00ECD2BD /* InlineContentView.swift */,
A5DD248D2A8DF27F00EF7364 /* Assets.xcassets */,
A5DD248F2A8DF27F00EF7364 /* Preview Content */,
);
Expand Down Expand Up @@ -86,7 +99,7 @@
);
name = "FittedSheet-SwiftUI-Example";
packageProductDependencies = (
A5A48EAC2A8E028200E9F2BD /* FittedSheetsSwiftUI */,
A59174722BA0A3E500ECD2BD /* FittedSheetsSwiftUI */,
);
productName = "FittedSheet-SwiftUI-Example";
productReference = A5DD24862A8DF27E00EF7364 /* FittedSheet-SwiftUI-Example.app */;
Expand Down Expand Up @@ -117,7 +130,6 @@
);
mainGroup = A5DD247D2A8DF27E00EF7364;
packageReferences = (
A5A48EAB2A8E028200E9F2BD /* XCRemoteSwiftPackageReference "FitttedSheets-SwiftUI" */,
);
productRefGroup = A5DD24872A8DF27E00EF7364 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -147,6 +159,7 @@
files = (
A5DD248C2A8DF27E00EF7364 /* ContentView.swift in Sources */,
A5DD248A2A8DF27E00EF7364 /* FittedSheet_SwiftUI_ExampleApp.swift in Sources */,
A59174752BA0A41B00ECD2BD /* InlineContentView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -283,6 +296,7 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -312,6 +326,7 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -348,21 +363,9 @@
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
A5A48EAB2A8E028200E9F2BD /* XCRemoteSwiftPackageReference "FitttedSheets-SwiftUI" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/Jeonhui/FitttedSheets-SwiftUI";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.0.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
A5A48EAC2A8E028200E9F2BD /* FittedSheetsSwiftUI */ = {
A59174722BA0A3E500ECD2BD /* FittedSheetsSwiftUI */ = {
isa = XCSwiftPackageProductDependency;
package = A5A48EAB2A8E028200E9F2BD /* XCRemoteSwiftPackageReference "FitttedSheets-SwiftUI" */;
productName = FittedSheetsSwiftUI;
};
/* End XCSwiftPackageProductDependency section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/gordontucker/FittedSheets",
"state" : {
"revision" : "3dcebb20ff42f644e9474a198acb886d4bd51793",
"version" : "2.5.3"
}
},
{
"identity" : "fitttedsheets-swiftui",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Jeonhui/FitttedSheets-SwiftUI",
"state" : {
"revision" : "c242a6d2f3e2ec30b62c5b6076caac8852cd389a",
"version" : "1.0.0"
"revision" : "5d7f5a6307ad510aa05de5a4a16ac40846d3b2d3",
"version" : "2.6.1"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,31 @@ import FittedSheetsSwiftUI
struct ContentView: View {
@State var showFittedSheet: Bool = false
let sheetConfiguration: SheetConfiguration = SheetConfiguration(
sizes: [.percent(0.5)],
sizes: [.fullscreen],
options: nil,
sheetViewControllerOptinos: [],
shouldDismiss: nil,
didDismiss: nil)

var body: some View {
VStack {
Button {
showFittedSheet.toggle()
} label: {
Text("open sheet")
NavigationView {
VStack {
NavigationLink {
InlineContentView()
} label: {
Text("Inline Mode Test")
}

Button {
showFittedSheet.toggle()
} label: {
Text("sheet button")
}
}
}
.fittedSheet(isPresented: $showFittedSheet,
configuration: sheetConfiguration) {
Text("opened")
Text("new Sheets")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//
// InlineContentView.swift
// FittedSheet-SwiftUI-Example
//
// Created by 이전희 on 3/12/24.
//

import SwiftUI
import FittedSheets
import FittedSheetsSwiftUI

struct InlineContentView: View {
@State var showInlineSheetView: Bool = false

let sheetConfiguration: SheetConfiguration = SheetConfiguration(
sizes: [.intrinsic, .percent(0.3), .fullscreen],
options: SheetOptions(
useInlineMode: true
),
sheetViewControllerOptinos: [],
shouldDismiss: nil,
didDismiss: nil)


var body: some View {
VStack {
VStack(alignment: .center) {
Spacer()
HStack{
Spacer()
Button {
showInlineSheetView.toggle()
} label: {
Text("Inline Mode Sheet Test")
.foregroundColor(.white)
}
Spacer()
}
Spacer()
}
.fittedSheet(isPresented: $showInlineSheetView,
configuration: sheetConfiguration) {
VStack {
Text("Inline Mode Testing")
}
}
.background(.blue)
}
.padding(.vertical, 40)
.padding(.horizontal, 40)
.background(.black)
}
}

#Preview {
InlineContentView()
}
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/gordontucker/FittedSheets",
"state" : {
"revision" : "3dcebb20ff42f644e9474a198acb886d4bd51793",
"version" : "2.5.3"
"revision" : "5d7f5a6307ad510aa05de5a4a16ac40846d3b2d3",
"version" : "2.6.1"
}
}
],
Expand Down
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ let package = Package(
targets: ["FittedSheetsSwiftUI"]),
],
dependencies: [
.package(url: "https://github.com/gordontucker/FittedSheets", from: "2.0.0")
.package(url: "https://github.com/gordontucker/FittedSheets",
from: "2.6.1")
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
Expand Down
Loading

0 comments on commit b401a54

Please sign in to comment.