├── .github
└── FUNDING.yml
├── Demo
├── SplitViewDemo
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ ├── SplitLayout.entitlements
│ ├── SplitLayoutApp.swift
│ ├── PastelColor.swift
│ └── ContentView.swift
└── SplitViewDemo.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── swiftpm
│ │ └── Package.resolved
│ └── project.pbxproj
├── .gitignore
├── Sources
└── SplitView
│ ├── SplitViewOrientation.swift
│ └── SplitView.swift
├── Package.swift
├── LICENCE
└── README.md
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [krzyzanowskim]
2 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /.build
3 | /Packages
4 | /*.xcodeproj
5 | xcuserdata/
6 | DerivedData/
7 | .swiftpm/config/registries.json
8 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9 | .netrc
10 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Sources/SplitView/SplitViewOrientation.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | public enum SplitViewOrientation {
4 | case vertical
5 | case horizontal
6 |
7 | public mutating func toggle() {
8 | switch self {
9 | case .vertical:
10 | self = .horizontal
11 | case .horizontal:
12 | self = .vertical
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo/SplitLayout.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-only
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo/SplitLayoutApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SplitLayoutApp.swift
3 | // SplitLayout
4 | //
5 | // Created by Marcin Krzyzanowski on 23/07/2022.
6 | //
7 |
8 | import SwiftUI
9 |
10 | @main
11 | struct SplitLayoutApp: App {
12 | var body: some Scene {
13 | WindowGroup {
14 | ContentView()
15 | .frame(width: 1200, height: 700)
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "pins" : [
3 | {
4 | "identity" : "sequencebuilder",
5 | "kind" : "remoteSourceControl",
6 | "location" : "https://github.com/andtie/SequenceBuilder",
7 | "state" : {
8 | "revision" : "54d3d1eff31a7e35122f616840fff11899ea85b4",
9 | "version" : "0.0.7"
10 | }
11 | }
12 | ],
13 | "version" : 2
14 | }
15 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version: 5.6
2 |
3 | import PackageDescription
4 |
5 | let package = Package(
6 | name: "SplitView",
7 | platforms: [.macOS(.v12), .iOS(.v13)],
8 | products: [
9 | .library(
10 | name: "SplitView",
11 | targets: ["SplitView"]),
12 | ],
13 | dependencies: [
14 | .package(url: "https://github.com/andtie/SequenceBuilder", from: "0.0.7"),
15 | ],
16 | targets: [
17 | .target(
18 | name: "SplitView",
19 | dependencies: ["SequenceBuilder"]),
20 | ]
21 | )
22 |
--------------------------------------------------------------------------------
/LICENCE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Marcin Krzyzanowski
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "scale" : "1x",
6 | "size" : "16x16"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "scale" : "2x",
11 | "size" : "16x16"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "scale" : "1x",
16 | "size" : "32x32"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "scale" : "2x",
21 | "size" : "32x32"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "scale" : "1x",
26 | "size" : "128x128"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "scale" : "2x",
31 | "size" : "128x128"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "scale" : "1x",
36 | "size" : "256x256"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "scale" : "2x",
41 | "size" : "256x256"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "scale" : "1x",
46 | "size" : "512x512"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "scale" : "2x",
51 | "size" : "512x512"
52 | }
53 | ],
54 | "info" : {
55 | "author" : "xcode",
56 | "version" : 1
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SplitView
2 |
3 | Experimental SwiftUI.SplitView (Vertical/Horizontal) view.
4 |
5 | Why? Because NSSplitView takes too much energy from whoever willing to make it work predictably.
6 |
7 | https://user-images.githubusercontent.com/758033/180766261-ad9ce52f-cb9b-4112-bd9c-1df6cb777033.mp4
8 |
9 | # Use
10 |
11 | ```swift
12 | import SplitView
13 |
14 | struct ContentView: View {
15 |
16 | var body: some View {
17 | SplitView(orientation: .constant(.horizontal)) {
18 | SampleContent()
19 | SampleContent()
20 | SplitView(orientation: .constant(.vertical)) {
21 | SampleContent()
22 | SampleContent()
23 | SampleContent()
24 | }
25 | SampleContent()
26 | SampleContent()
27 | SplitView(orientation: .constant(.vertical)) {
28 | SampleContent()
29 | SampleContent()
30 | SampleContent()
31 | }
32 | }
33 | }
34 |
35 | }
36 |
37 | private struct SampleContent: View {
38 | var body: some View {
39 | ZStack {
40 | Rectangle()
41 | .foregroundColor(.yellow)
42 |
43 | HStack {
44 | Text("Lorem ipsum")
45 | }
46 | }
47 | }
48 | }
49 | ```
50 |
51 | # Contribution
52 |
53 | Work in progress 👷♂️
54 | Feel free to Discuss and submit Pull Request
55 |
56 | ## Design notes
57 |
58 | 
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo/PastelColor.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | public extension Color {
4 |
5 | enum Pastel {
6 | case `default`
7 | case oklab
8 |
9 | var color: Color {
10 | switch self {
11 | case .default:
12 | return Color(
13 | hue: .random(in: 0...1),
14 | saturation: .random(in: 0.25...0.95),
15 | brightness: .random(in: 0.85...0.95)
16 | )
17 | case .oklab:
18 | let chroma: Double = 0.07
19 | let hue: Angle = .init(degrees: .random(in: 0...360))
20 | return Color(
21 | lightness: 0.84,
22 | a: chroma * cos(hue.radians),
23 | b: chroma * sin(hue.radians)
24 | )
25 | }
26 | }
27 |
28 | static func random(_ mode: Pastel = .default) -> Color {
29 | mode.color
30 | }
31 |
32 | }
33 |
34 |
35 | /// A `Color` defined in the OKLab color space.
36 | ///
37 | /// - Parameters:
38 | /// - l: Perceived lightness.
39 | /// - a: How green/red the color is.
40 | /// - b: How blue/yellow the color is.
41 | private init(lightness l: Double, a: Double, b: Double, opacity: Double = 1) {
42 | let l_ = l + 0.3963377774 * a + 0.2158037573 * b
43 | let m_ = l - 0.1055613458 * a - 0.0638541728 * b
44 | let s_ = l - 0.0894841775 * a - 1.2914855480 * b
45 |
46 | let l = l_ * l_ * l_
47 | let m = m_ * m_ * m_
48 | let s = s_ * s_ * s_
49 |
50 | let r = +4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s
51 | let g = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s
52 | let b = -0.0041960863 * l - 0.7034186147 * m + 1.7076147010 * s
53 |
54 | self.init(.sRGBLinear, red: r, green: g, blue: b, opacity: opacity)
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo/ContentView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import SplitView
3 |
4 | struct ContentView: View {
5 | @State var orientation1: SplitViewOrientation = .horizontal
6 | @State var orientation2: SplitViewOrientation = .vertical
7 | @State var orientation3: SplitViewOrientation = .vertical
8 |
9 | var body: some View {
10 | SplitView(orientation: $orientation1) {
11 | SampleContent()
12 | SampleContent()
13 | SplitView(orientation: $orientation2) {
14 | SampleContent()
15 | SampleContent()
16 | SampleContent()
17 | SampleContent()
18 | SampleContent()
19 | }
20 | .onTapGesture {
21 | orientation2.toggle()
22 | }
23 | SampleContent()
24 | SampleContent()
25 | SampleContent()
26 | SplitView(orientation: $orientation3) {
27 | SampleContent()
28 | SampleContent()
29 | SampleContent()
30 | SampleContent()
31 | SampleContent()
32 | }
33 | .onTapGesture {
34 | orientation3.toggle()
35 | }
36 | }
37 | .onTapGesture {
38 | orientation1.toggle()
39 | }
40 | }
41 | }
42 |
43 | struct SampleContent: View {
44 | @State var color: Color = .Pastel.random(.oklab)
45 |
46 | var body: some View {
47 | ZStack {
48 | Rectangle()
49 | .foregroundColor(color)
50 | .onTapGesture {
51 | color = .Pastel.random(.oklab)
52 | }
53 |
54 | HStack {
55 | Text("Lorem ipsum")
56 | }
57 |
58 | }
59 | }
60 | }
61 |
62 | struct ContentView_Previews: PreviewProvider {
63 | static var previews: some View {
64 | ContentView()
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/Sources/SplitView/SplitView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import SequenceBuilder
3 |
4 | public struct SplitView: View where Content.Element: View, Content.Index == Int {
5 |
6 | private let content: Content
7 | private let dividerColor: Color
8 | private let dividerThickness: Double
9 | @Binding private var orientation: SplitViewOrientation
10 |
11 | @State private var dividerOffsets: [Content.Index: CGPoint] = [:]
12 | @State private var sizes: [Content.Index: CGSize] = [:]
13 |
14 | public init(
15 | orientation: Binding = .constant(.horizontal),
16 | dividerColor: Color = Color(NSColor.separatorColor),
17 | dividerThickness: Double = 10,
18 | @SequenceBuilder content: () -> Content)
19 | {
20 | self._orientation = orientation
21 | self.dividerThickness = dividerThickness
22 | self.dividerColor = dividerColor
23 | self.content = content()
24 | }
25 |
26 | public init(
27 | orientation: SplitViewOrientation = .horizontal,
28 | dividerColor: Color = Color(NSColor.separatorColor),
29 | dividerThickness: Double = 10,
30 | @SequenceBuilder content: () -> Content
31 | ) {
32 | self._orientation = .constant(orientation)
33 | self.dividerThickness = dividerThickness
34 | self.dividerColor = dividerColor
35 | self.content = content()
36 | }
37 |
38 | public var body: some View {
39 | Group {
40 | switch orientation {
41 | case .horizontal:
42 | HStack(spacing: 0) {
43 | contentView
44 | }
45 | case .vertical:
46 | VStack(spacing: 0) {
47 | contentView
48 | }
49 | }
50 | }
51 | .onChange(of: orientation) { newValue in
52 | dividerOffsets = [:]
53 | }
54 |
55 | }
56 |
57 | private var contentView: some View {
58 | ForEach(sequence: content) { (index, content) in
59 | GeometryReader { geometry in
60 | switch orientation {
61 | case .horizontal:
62 | Group {
63 | let newWidth = geometry.size.width + dividerOffset(index: index).x - dividerOffset(index: index - 1).x
64 | if newWidth.isZero || newWidth < 0 {
65 | EmptyView()
66 | } else {
67 | content
68 | .frame(width: max(0, newWidth))
69 | .offset(x: dividerOffset(index: index - 1).x)
70 | }
71 | }
72 | .background(GeometryReader { geometry in
73 | // Track the overallSize using a GeometryReader on the ZStack that contains the
74 | // primary, secondary, and splitter
75 | Color.clear
76 | .preference(key: SizePreferenceKey.self, value: geometry.size)
77 | .onPreferenceChange(SizePreferenceKey.self) {
78 | sizes[index] = $0
79 | }
80 | })
81 | case .vertical:
82 | let newHeight = geometry.size.height + dividerOffset(index: index).y - dividerOffset(index: index - 1).y
83 | if newHeight.isZero || newHeight < 0 {
84 | EmptyView()
85 | } else {
86 | content
87 | .frame(height: newHeight)
88 | .offset(y: dividerOffset(index: index - 1).y)
89 | }
90 | }
91 | }
92 |
93 | if index != self.content.count - 1 { // not last
94 | Group {
95 | switch orientation {
96 | case .horizontal:
97 | SplitDivider(
98 | orientation: $orientation,
99 | color: dividerColor
100 | )
101 | .thickness(dividerThickness)
102 | .offset(x: dividerOffset(index: index).x)
103 | case .vertical:
104 | SplitDivider(
105 | orientation: $orientation,
106 | color: dividerColor
107 | )
108 | .thickness(dividerThickness)
109 | .offset(y: dividerOffset(index: index).y)
110 | }
111 | }
112 | .gesture(
113 | DragGesture()
114 | .onChanged { value in
115 | dividerOffsets[index] = CGPoint(
116 | x: value.location.x,
117 | y: value.location.y
118 | )
119 | }
120 | )
121 | }
122 | }
123 | }
124 |
125 | private func dividerOffset(index: Int) -> CGPoint {
126 | dividerOffsets[index] ?? .zero
127 | }
128 |
129 | private struct SplitDivider: View {
130 | @Binding var orientation: SplitViewOrientation
131 | let color: Color
132 |
133 | var body: some View {
134 | Rectangle()
135 | .foregroundColor(color)
136 | }
137 |
138 | func thickness(_ value: Double) -> some View {
139 | switch orientation {
140 | case .horizontal:
141 | return self.frame(width: value)
142 | case .vertical:
143 | return self.frame(height: value)
144 | }
145 | }
146 | }
147 | }
148 |
149 | fileprivate struct SizePreferenceKey: PreferenceKey {
150 | static var defaultValue: CGSize = .zero
151 |
152 | static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
153 | value = nextValue()
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/Demo/SplitViewDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 56;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 759121F4288C2BD2003AD3D8 /* SplitLayoutApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 759121F3288C2BD2003AD3D8 /* SplitLayoutApp.swift */; };
11 | 759121F6288C2BD2003AD3D8 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 759121F5288C2BD2003AD3D8 /* ContentView.swift */; };
12 | 759121F8288C2BD3003AD3D8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 759121F7288C2BD3003AD3D8 /* Assets.xcassets */; };
13 | 759121FB288C2BD3003AD3D8 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 759121FA288C2BD3003AD3D8 /* Preview Assets.xcassets */; };
14 | 75DA9C28288DC5DE007549FF /* PastelColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75DA9C27288DC5DE007549FF /* PastelColor.swift */; };
15 | 75E7457A288EAF6D00C3CE21 /* SplitView in Frameworks */ = {isa = PBXBuildFile; productRef = 75E74579288EAF6D00C3CE21 /* SplitView */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXFileReference section */
19 | 754B5116288EB0AC002EA63A /* SplitView */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = SplitView; path = ../..; sourceTree = ""; };
20 | 759121F0288C2BD2003AD3D8 /* SplitViewDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SplitViewDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
21 | 759121F3288C2BD2003AD3D8 /* SplitLayoutApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplitLayoutApp.swift; sourceTree = ""; };
22 | 759121F5288C2BD2003AD3D8 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
23 | 759121F7288C2BD3003AD3D8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
24 | 759121FA288C2BD3003AD3D8 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
25 | 759121FC288C2BD3003AD3D8 /* SplitLayout.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SplitLayout.entitlements; sourceTree = ""; };
26 | 75DA9C27288DC5DE007549FF /* PastelColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PastelColor.swift; sourceTree = ""; };
27 | /* End PBXFileReference section */
28 |
29 | /* Begin PBXFrameworksBuildPhase section */
30 | 759121ED288C2BD2003AD3D8 /* Frameworks */ = {
31 | isa = PBXFrameworksBuildPhase;
32 | buildActionMask = 2147483647;
33 | files = (
34 | 75E7457A288EAF6D00C3CE21 /* SplitView in Frameworks */,
35 | );
36 | runOnlyForDeploymentPostprocessing = 0;
37 | };
38 | /* End PBXFrameworksBuildPhase section */
39 |
40 | /* Begin PBXGroup section */
41 | 759121E7288C2BD2003AD3D8 = {
42 | isa = PBXGroup;
43 | children = (
44 | 759121F2288C2BD2003AD3D8 /* SplitViewDemo */,
45 | 759121F1288C2BD2003AD3D8 /* Products */,
46 | 75E74578288EAF6D00C3CE21 /* Frameworks */,
47 | );
48 | sourceTree = "";
49 | };
50 | 759121F1288C2BD2003AD3D8 /* Products */ = {
51 | isa = PBXGroup;
52 | children = (
53 | 759121F0288C2BD2003AD3D8 /* SplitViewDemo.app */,
54 | );
55 | name = Products;
56 | sourceTree = "";
57 | };
58 | 759121F2288C2BD2003AD3D8 /* SplitViewDemo */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 754B5116288EB0AC002EA63A /* SplitView */,
62 | 759121F3288C2BD2003AD3D8 /* SplitLayoutApp.swift */,
63 | 759121F5288C2BD2003AD3D8 /* ContentView.swift */,
64 | 75DA9C27288DC5DE007549FF /* PastelColor.swift */,
65 | 759121F7288C2BD3003AD3D8 /* Assets.xcassets */,
66 | 759121FC288C2BD3003AD3D8 /* SplitLayout.entitlements */,
67 | 759121F9288C2BD3003AD3D8 /* Preview Content */,
68 | );
69 | path = SplitViewDemo;
70 | sourceTree = "";
71 | };
72 | 759121F9288C2BD3003AD3D8 /* Preview Content */ = {
73 | isa = PBXGroup;
74 | children = (
75 | 759121FA288C2BD3003AD3D8 /* Preview Assets.xcassets */,
76 | );
77 | path = "Preview Content";
78 | sourceTree = "";
79 | };
80 | 75E74578288EAF6D00C3CE21 /* Frameworks */ = {
81 | isa = PBXGroup;
82 | children = (
83 | );
84 | name = Frameworks;
85 | sourceTree = "";
86 | };
87 | /* End PBXGroup section */
88 |
89 | /* Begin PBXNativeTarget section */
90 | 759121EF288C2BD2003AD3D8 /* SplitViewDemo */ = {
91 | isa = PBXNativeTarget;
92 | buildConfigurationList = 759121FF288C2BD3003AD3D8 /* Build configuration list for PBXNativeTarget "SplitViewDemo" */;
93 | buildPhases = (
94 | 759121EC288C2BD2003AD3D8 /* Sources */,
95 | 759121ED288C2BD2003AD3D8 /* Frameworks */,
96 | 759121EE288C2BD2003AD3D8 /* Resources */,
97 | );
98 | buildRules = (
99 | );
100 | dependencies = (
101 | );
102 | name = SplitViewDemo;
103 | packageProductDependencies = (
104 | 75E74579288EAF6D00C3CE21 /* SplitView */,
105 | );
106 | productName = SplitLayout;
107 | productReference = 759121F0288C2BD2003AD3D8 /* SplitViewDemo.app */;
108 | productType = "com.apple.product-type.application";
109 | };
110 | /* End PBXNativeTarget section */
111 |
112 | /* Begin PBXProject section */
113 | 759121E8288C2BD2003AD3D8 /* Project object */ = {
114 | isa = PBXProject;
115 | attributes = {
116 | BuildIndependentTargetsInParallel = 1;
117 | LastSwiftUpdateCheck = 1400;
118 | LastUpgradeCheck = 1400;
119 | TargetAttributes = {
120 | 759121EF288C2BD2003AD3D8 = {
121 | CreatedOnToolsVersion = 14.0;
122 | };
123 | };
124 | };
125 | buildConfigurationList = 759121EB288C2BD2003AD3D8 /* Build configuration list for PBXProject "SplitViewDemo" */;
126 | compatibilityVersion = "Xcode 14.0";
127 | developmentRegion = en;
128 | hasScannedForEncodings = 0;
129 | knownRegions = (
130 | en,
131 | Base,
132 | );
133 | mainGroup = 759121E7288C2BD2003AD3D8;
134 | packageReferences = (
135 | );
136 | productRefGroup = 759121F1288C2BD2003AD3D8 /* Products */;
137 | projectDirPath = "";
138 | projectRoot = "";
139 | targets = (
140 | 759121EF288C2BD2003AD3D8 /* SplitViewDemo */,
141 | );
142 | };
143 | /* End PBXProject section */
144 |
145 | /* Begin PBXResourcesBuildPhase section */
146 | 759121EE288C2BD2003AD3D8 /* Resources */ = {
147 | isa = PBXResourcesBuildPhase;
148 | buildActionMask = 2147483647;
149 | files = (
150 | 759121FB288C2BD3003AD3D8 /* Preview Assets.xcassets in Resources */,
151 | 759121F8288C2BD3003AD3D8 /* Assets.xcassets in Resources */,
152 | );
153 | runOnlyForDeploymentPostprocessing = 0;
154 | };
155 | /* End PBXResourcesBuildPhase section */
156 |
157 | /* Begin PBXSourcesBuildPhase section */
158 | 759121EC288C2BD2003AD3D8 /* Sources */ = {
159 | isa = PBXSourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 759121F6288C2BD2003AD3D8 /* ContentView.swift in Sources */,
163 | 759121F4288C2BD2003AD3D8 /* SplitLayoutApp.swift in Sources */,
164 | 75DA9C28288DC5DE007549FF /* PastelColor.swift in Sources */,
165 | );
166 | runOnlyForDeploymentPostprocessing = 0;
167 | };
168 | /* End PBXSourcesBuildPhase section */
169 |
170 | /* Begin XCBuildConfiguration section */
171 | 759121FD288C2BD3003AD3D8 /* Debug */ = {
172 | isa = XCBuildConfiguration;
173 | buildSettings = {
174 | ALWAYS_SEARCH_USER_PATHS = NO;
175 | CLANG_ANALYZER_NONNULL = YES;
176 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
177 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
178 | CLANG_ENABLE_MODULES = YES;
179 | CLANG_ENABLE_OBJC_ARC = YES;
180 | CLANG_ENABLE_OBJC_WEAK = YES;
181 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
182 | CLANG_WARN_BOOL_CONVERSION = YES;
183 | CLANG_WARN_COMMA = YES;
184 | CLANG_WARN_CONSTANT_CONVERSION = YES;
185 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
186 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
187 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
188 | CLANG_WARN_EMPTY_BODY = YES;
189 | CLANG_WARN_ENUM_CONVERSION = YES;
190 | CLANG_WARN_INFINITE_RECURSION = YES;
191 | CLANG_WARN_INT_CONVERSION = YES;
192 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
193 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
194 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
195 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
196 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
197 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
198 | CLANG_WARN_STRICT_PROTOTYPES = YES;
199 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
200 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
201 | CLANG_WARN_UNREACHABLE_CODE = YES;
202 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
203 | COPY_PHASE_STRIP = NO;
204 | DEBUG_INFORMATION_FORMAT = dwarf;
205 | ENABLE_STRICT_OBJC_MSGSEND = YES;
206 | ENABLE_TESTABILITY = YES;
207 | GCC_C_LANGUAGE_STANDARD = gnu11;
208 | GCC_DYNAMIC_NO_PIC = NO;
209 | GCC_NO_COMMON_BLOCKS = YES;
210 | GCC_OPTIMIZATION_LEVEL = 0;
211 | GCC_PREPROCESSOR_DEFINITIONS = (
212 | "DEBUG=1",
213 | "$(inherited)",
214 | );
215 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
216 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
217 | GCC_WARN_UNDECLARED_SELECTOR = YES;
218 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
219 | GCC_WARN_UNUSED_FUNCTION = YES;
220 | GCC_WARN_UNUSED_VARIABLE = YES;
221 | MACOSX_DEPLOYMENT_TARGET = 12.5;
222 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
223 | MTL_FAST_MATH = YES;
224 | ONLY_ACTIVE_ARCH = YES;
225 | SDKROOT = macosx;
226 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
227 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
228 | };
229 | name = Debug;
230 | };
231 | 759121FE288C2BD3003AD3D8 /* Release */ = {
232 | isa = XCBuildConfiguration;
233 | buildSettings = {
234 | ALWAYS_SEARCH_USER_PATHS = NO;
235 | CLANG_ANALYZER_NONNULL = YES;
236 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
237 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
238 | CLANG_ENABLE_MODULES = YES;
239 | CLANG_ENABLE_OBJC_ARC = YES;
240 | CLANG_ENABLE_OBJC_WEAK = YES;
241 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
242 | CLANG_WARN_BOOL_CONVERSION = YES;
243 | CLANG_WARN_COMMA = YES;
244 | CLANG_WARN_CONSTANT_CONVERSION = YES;
245 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
246 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
247 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
248 | CLANG_WARN_EMPTY_BODY = YES;
249 | CLANG_WARN_ENUM_CONVERSION = YES;
250 | CLANG_WARN_INFINITE_RECURSION = YES;
251 | CLANG_WARN_INT_CONVERSION = YES;
252 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
253 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
254 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
255 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
256 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
258 | CLANG_WARN_STRICT_PROTOTYPES = YES;
259 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
260 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
261 | CLANG_WARN_UNREACHABLE_CODE = YES;
262 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
263 | COPY_PHASE_STRIP = NO;
264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
265 | ENABLE_NS_ASSERTIONS = NO;
266 | ENABLE_STRICT_OBJC_MSGSEND = YES;
267 | GCC_C_LANGUAGE_STANDARD = gnu11;
268 | GCC_NO_COMMON_BLOCKS = YES;
269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
271 | GCC_WARN_UNDECLARED_SELECTOR = YES;
272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273 | GCC_WARN_UNUSED_FUNCTION = YES;
274 | GCC_WARN_UNUSED_VARIABLE = YES;
275 | MACOSX_DEPLOYMENT_TARGET = 12.5;
276 | MTL_ENABLE_DEBUG_INFO = NO;
277 | MTL_FAST_MATH = YES;
278 | SDKROOT = macosx;
279 | SWIFT_COMPILATION_MODE = wholemodule;
280 | SWIFT_OPTIMIZATION_LEVEL = "-O";
281 | };
282 | name = Release;
283 | };
284 | 75912200288C2BD3003AD3D8 /* Debug */ = {
285 | isa = XCBuildConfiguration;
286 | buildSettings = {
287 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
288 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
289 | CODE_SIGN_ENTITLEMENTS = SplitViewDemo/SplitLayout.entitlements;
290 | CODE_SIGN_STYLE = Automatic;
291 | COMBINE_HIDPI_IMAGES = YES;
292 | CURRENT_PROJECT_VERSION = 1;
293 | DEVELOPMENT_ASSET_PATHS = "\"SplitViewDemo/Preview Content\"";
294 | ENABLE_PREVIEWS = YES;
295 | GENERATE_INFOPLIST_FILE = YES;
296 | INFOPLIST_KEY_NSHumanReadableCopyright = "";
297 | LD_RUNPATH_SEARCH_PATHS = (
298 | "$(inherited)",
299 | "@executable_path/../Frameworks",
300 | );
301 | MARKETING_VERSION = 1.0;
302 | PRODUCT_BUNDLE_IDENTIFIER = swift.best.SplitViewDemo;
303 | PRODUCT_NAME = "$(TARGET_NAME)";
304 | SWIFT_EMIT_LOC_STRINGS = YES;
305 | SWIFT_VERSION = 5.0;
306 | };
307 | name = Debug;
308 | };
309 | 75912201288C2BD3003AD3D8 /* Release */ = {
310 | isa = XCBuildConfiguration;
311 | buildSettings = {
312 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
313 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
314 | CODE_SIGN_ENTITLEMENTS = SplitViewDemo/SplitLayout.entitlements;
315 | CODE_SIGN_STYLE = Automatic;
316 | COMBINE_HIDPI_IMAGES = YES;
317 | CURRENT_PROJECT_VERSION = 1;
318 | DEVELOPMENT_ASSET_PATHS = "\"SplitViewDemo/Preview Content\"";
319 | ENABLE_PREVIEWS = YES;
320 | GENERATE_INFOPLIST_FILE = YES;
321 | INFOPLIST_KEY_NSHumanReadableCopyright = "";
322 | LD_RUNPATH_SEARCH_PATHS = (
323 | "$(inherited)",
324 | "@executable_path/../Frameworks",
325 | );
326 | MARKETING_VERSION = 1.0;
327 | PRODUCT_BUNDLE_IDENTIFIER = swift.best.SplitViewDemo;
328 | PRODUCT_NAME = "$(TARGET_NAME)";
329 | SWIFT_EMIT_LOC_STRINGS = YES;
330 | SWIFT_VERSION = 5.0;
331 | };
332 | name = Release;
333 | };
334 | /* End XCBuildConfiguration section */
335 |
336 | /* Begin XCConfigurationList section */
337 | 759121EB288C2BD2003AD3D8 /* Build configuration list for PBXProject "SplitViewDemo" */ = {
338 | isa = XCConfigurationList;
339 | buildConfigurations = (
340 | 759121FD288C2BD3003AD3D8 /* Debug */,
341 | 759121FE288C2BD3003AD3D8 /* Release */,
342 | );
343 | defaultConfigurationIsVisible = 0;
344 | defaultConfigurationName = Release;
345 | };
346 | 759121FF288C2BD3003AD3D8 /* Build configuration list for PBXNativeTarget "SplitViewDemo" */ = {
347 | isa = XCConfigurationList;
348 | buildConfigurations = (
349 | 75912200288C2BD3003AD3D8 /* Debug */,
350 | 75912201288C2BD3003AD3D8 /* Release */,
351 | );
352 | defaultConfigurationIsVisible = 0;
353 | defaultConfigurationName = Release;
354 | };
355 | /* End XCConfigurationList section */
356 |
357 | /* Begin XCSwiftPackageProductDependency section */
358 | 75E74579288EAF6D00C3CE21 /* SplitView */ = {
359 | isa = XCSwiftPackageProductDependency;
360 | productName = SplitView;
361 | };
362 | /* End XCSwiftPackageProductDependency section */
363 | };
364 | rootObject = 759121E8288C2BD2003AD3D8 /* Project object */;
365 | }
366 |
--------------------------------------------------------------------------------