Skip to content

Commit

Permalink
Make isNarrow public
Browse files Browse the repository at this point in the history
  • Loading branch information
eonist committed Oct 22, 2024
1 parent 5d6218d commit eb27233
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions ExampleProject/ExampleProject.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
F1E583872CC430E800A59A2B /* DetailList+Content.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1E583862CC430E800A59A2B /* DetailList+Content.swift */; };
F1E9FE442CC6EE4A003C64D7 /* IconButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1E9FE432CC6EE4A003C64D7 /* IconButtonStyle.swift */; };
F1E9FE472CC725EB003C64D7 /* HybridColor in Frameworks */ = {isa = PBXBuildFile; productRef = F1E9FE462CC725EB003C64D7 /* HybridColor */; };
F1E9FE4A2CC72DBA003C64D7 /* DefaultColumnWidth.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1E9FE482CC72DBA003C64D7 /* DefaultColumnWidth.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -92,6 +93,7 @@
F1E583842CC42DED00A59A2B /* DetailList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailList.swift; sourceTree = "<group>"; };
F1E583862CC430E800A59A2B /* DetailList+Content.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DetailList+Content.swift"; sourceTree = "<group>"; };
F1E9FE432CC6EE4A003C64D7 /* IconButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconButtonStyle.swift; sourceTree = "<group>"; };
F1E9FE482CC72DBA003C64D7 /* DefaultColumnWidth.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultColumnWidth.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -231,6 +233,7 @@
F1E583592CC416E800A59A2B /* example */ = {
isa = PBXGroup;
children = (
F1E9FE492CC72DBA003C64D7 /* util */,
F1E583742CC418E000A59A2B /* style */,
F1E583392CC416E800A59A2B /* model */,
F1E583542CC416E800A59A2B /* view */,
Expand Down Expand Up @@ -282,6 +285,14 @@
path = DetailList;
sourceTree = "<group>";
};
F1E9FE492CC72DBA003C64D7 /* util */ = {
isa = PBXGroup;
children = (
F1E9FE482CC72DBA003C64D7 /* DefaultColumnWidth.swift */,
);
path = util;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -370,6 +381,7 @@
F1E5835F2CC416E800A59A2B /* DetailHeader+Content.swift in Sources */,
F13FE4D32CC473F40039CC7B /* DetailData.swift in Sources */,
F1E583692CC416E800A59A2B /* ListButtonStyle.swift in Sources */,
F1E9FE4A2CC72DBA003C64D7 /* DefaultColumnWidth.swift in Sources */,
F1E583822CC4294100A59A2B /* SideBarList+Content.swift in Sources */,
F1E5836B2CC416E800A59A2B /* SideBarHeader+Content.swift in Sources */,
F1E583642CC416E800A59A2B /* MainHeader+Preview.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"location" : "https://github.com/sentryco/SplitViewKit",
"state" : {
"branch" : "main",
"revision" : "397b4ba356636c34b7c494a1d5a370b52f9252fd"
"revision" : "5d6218d96ef40178cc892ccc866bd0f8d338bd68"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import SplitViewKit
/**
* Const
* - Note: Must be public to be initiatable in init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extension ColumnWidthKind {
* - isLandscape: A Boolean value indicating whether the device is in landscape orientation.
* - Returns: A Boolean value indicating whether the window is considered narrow.
*/
func isNarrow(isLandscape: Bool = true, winWidth: CGFloat) -> Bool { /*deviceOrientation: UIDeviceOrientation*/
public func isNarrow(isLandscape: Bool = true, winWidth: CGFloat) -> Bool { /*deviceOrientation: UIDeviceOrientation*/
#if os(iOS)
let isWindowWidthLessThanScreenWidth: Bool = winWidth < UIScreen.main.bounds.width
return !isLandscape || isWindowWidthLessThanScreenWidth // deviceOrientation.isPortrait
Expand Down

0 comments on commit eb27233

Please sign in to comment.