Skip to content

Commit

Permalink
Up minimal macOS and watchOS versions
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanov91 committed May 10, 2022
1 parent a1cd49f commit 47b7c03
Show file tree
Hide file tree
Showing 23 changed files with 1,030 additions and 1,017 deletions.
2 changes: 1 addition & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/OversizeUI.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1320"
LastUpgradeVersion = "1330"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
28 changes: 9 additions & 19 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
114C9CCF26ECC75300520E04 /* OversizeUI in Frameworks */ = {isa = PBXBuildFile; productRef = 114C9CCE26ECC75300520E04 /* OversizeUI */; };
11BE8AF426E9509A0068BBE9 /* ComponentsList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AF326E9509A0068BBE9 /* ComponentsList.swift */; };
11BE8AF526E9509A0068BBE9 /* ComponentsList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AF326E9509A0068BBE9 /* ComponentsList.swift */; };
11BE8AF726E950D50068BBE9 /* ButtonsDemo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AF626E950D50068BBE9 /* ButtonsDemo.swift */; };
11BE8AF826E950D50068BBE9 /* ButtonsDemo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AF626E950D50068BBE9 /* ButtonsDemo.swift */; };
11BE8AF926E950D50068BBE9 /* ButtonsDemo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AF626E950D50068BBE9 /* ButtonsDemo.swift */; };
11BE8AFB26E9512A0068BBE9 /* ColorSelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AFA26E9512A0068BBE9 /* ColorSelector.swift */; };
11BE8AFC26E9512A0068BBE9 /* ColorSelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AFA26E9512A0068BBE9 /* ColorSelector.swift */; };
11BE8AFD26E9512A0068BBE9 /* ColorSelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AFA26E9512A0068BBE9 /* ColorSelector.swift */; };
Expand All @@ -54,7 +51,6 @@
11BE8B1526E9564B0068BBE9 /* SelectDemo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8B1226E9564B0068BBE9 /* SelectDemo.swift */; };
11BE8B1926E956A40068BBE9 /* ComponentsList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AF326E9509A0068BBE9 /* ComponentsList.swift */; };
11BE8B1A26E956A60068BBE9 /* ColorSelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AFA26E9512A0068BBE9 /* ColorSelector.swift */; };
11BE8B1B26E956A60068BBE9 /* ButtonsDemo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AF626E950D50068BBE9 /* ButtonsDemo.swift */; };
11BE8B1C26E956A60068BBE9 /* AvatarDemo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8AFE26E954350068BBE9 /* AvatarDemo.swift */; };
11BE8B1E26E956A60068BBE9 /* IconsDemo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8B0626E955560068BBE9 /* IconsDemo.swift */; };
11BE8B1F26E956A60068BBE9 /* RowDemo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BE8B0A26E9558C0068BBE9 /* RowDemo.swift */; };
Expand Down Expand Up @@ -558,7 +554,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1250;
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1330;
TargetAttributes = {
1101694926E41DE10035CB67 = {
CreatedOnToolsVersion = 12.5.1;
Expand Down Expand Up @@ -701,7 +697,6 @@
11BE8B3726E962840068BBE9 /* ExampleApp.swift in Sources */,
11BE8B1A26E956A60068BBE9 /* ColorSelector.swift in Sources */,
11BE8B2226E956A60068BBE9 /* SelectDemo.swift in Sources */,
11BE8B1B26E956A60068BBE9 /* ButtonsDemo.swift in Sources */,
11BE8B3126E957510068BBE9 /* TextFieldDemo.swift in Sources */,
11BE8B1C26E956A60068BBE9 /* AvatarDemo.swift in Sources */,
1101696526E41DE40035CB67 /* NotificationView.swift in Sources */,
Expand Down Expand Up @@ -732,7 +727,6 @@
11BE8B3426E95F1C0068BBE9 /* ExampleApp.swift in Sources */,
11BE8B1926E956A40068BBE9 /* ComponentsList.swift in Sources */,
2D7E2DBD28030EFA00B9884C /* ButtonsDemo.swift in Sources */,
11BE8AF926E950D50068BBE9 /* ButtonsDemo.swift in Sources */,
11BE8B0926E955560068BBE9 /* IconsDemo.swift in Sources */,
11BE8AFD26E9512A0068BBE9 /* ColorSelector.swift in Sources */,
11BE8B0526E954D50068BBE9 /* GridSelectDemo.swift in Sources */,
Expand Down Expand Up @@ -763,7 +757,6 @@
11BE8B2F26E957510068BBE9 /* TextFieldDemo.swift in Sources */,
11BE8B0B26E9558C0068BBE9 /* RowDemo.swift in Sources */,
11BE8AFB26E9512A0068BBE9 /* ColorSelector.swift in Sources */,
11BE8AF726E950D50068BBE9 /* ButtonsDemo.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -784,7 +777,6 @@
11BE8B3026E957510068BBE9 /* TextFieldDemo.swift in Sources */,
11BE8B0C26E9558C0068BBE9 /* RowDemo.swift in Sources */,
11BE8AFC26E9512A0068BBE9 /* ColorSelector.swift in Sources */,
11BE8AF826E950D50068BBE9 /* ButtonsDemo.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -863,7 +855,7 @@
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 7.4;
WATCHOS_DEPLOYMENT_TARGET = 8.0;
};
name = Debug;
};
Expand All @@ -889,7 +881,7 @@
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
VALIDATE_PRODUCT = YES;
WATCHOS_DEPLOYMENT_TARGET = 7.4;
WATCHOS_DEPLOYMENT_TARGET = 8.0;
};
name = Release;
};
Expand All @@ -912,7 +904,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 7.4;
WATCHOS_DEPLOYMENT_TARGET = 8.0;
};
name = Debug;
};
Expand All @@ -936,7 +928,7 @@
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
VALIDATE_PRODUCT = YES;
WATCHOS_DEPLOYMENT_TARGET = 7.4;
WATCHOS_DEPLOYMENT_TARGET = 8.0;
};
name = Release;
};
Expand Down Expand Up @@ -1029,7 +1021,6 @@
110169AB26E423290035CB67 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
ENABLE_PREVIEWS = YES;
Expand All @@ -1043,14 +1034,13 @@
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 14.5;
TVOS_DEPLOYMENT_TARGET = 15.0;
};
name = Debug;
};
110169AC26E423290035CB67 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
ENABLE_PREVIEWS = YES;
Expand All @@ -1064,7 +1054,7 @@
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 14.5;
TVOS_DEPLOYMENT_TARGET = 15.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand Down Expand Up @@ -1242,7 +1232,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MACOSX_DEPLOYMENT_TARGET = 12.0;
PRODUCT_BUNDLE_IDENTIFIER = romanov.cc.Example;
PRODUCT_NAME = Example;
SDKROOT = macosx;
Expand All @@ -1267,7 +1257,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MACOSX_DEPLOYMENT_TARGET = 12.0;
PRODUCT_BUNDLE_IDENTIFIER = romanov.cc.Example;
PRODUCT_NAME = Example;
SDKROOT = macosx;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1330"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
8 changes: 6 additions & 2 deletions Example/Shared/ComponentsList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ struct ComponentsList: View {
Page(name: "Avatar", page: AnyView(AvatarDemo())),
Page(name: "GridSelect", page: AnyView(GridSelectDemo())),
Page(name: "TextField", page: AnyView(TextFieldDemo())),
Page(name: "Icons", page: AnyView(IconsDemo())),
//Page(name: "Icons", page: AnyView(IconsDemo())),
Page(name: "Row", page: AnyView(RowDemo())),
Page(name: "SegmentedControl", page: AnyView(SegmentedControlDemo())),
Page(name: "Select", page: AnyView(SelectDemo())),
Page(name: "Surface", page: AnyView(SurfaceDemo())),
Page(name: "Page", page: AnyView(PageDemo())),
//Page(name: "Page", page: AnyView(PageDemo())),
]

var body: some View {
#if os(iOS)
PageView("Example") {
ForEach(pages) { page in
HStack {
Expand All @@ -53,6 +54,9 @@ struct ComponentsList: View {
.sheet(isPresented: $isShowSetting) {
AppearanceSettingView()
}
#else
Text("Support will be in the future")
#endif
}
}

Expand Down
2 changes: 1 addition & 1 deletion Example/Shared/DemoPages/AvatarDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct AvatarDemo: View {
AvatarView(firstName: "Jhon", lastName: "Smith", size: .large, stroke: true)
}
}
.navigationBarTitle("Avatar", displayMode: .inline)
.navigationTitle("Avatar")
}
}

Expand Down
2 changes: 1 addition & 1 deletion Example/Shared/DemoPages/ButtonsDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct ButtonsDemo: View {

}.padding()
}
.navigationBarTitle("Buttons", displayMode: .inline)
.navigationTitle("Buttons")
}
}

Expand Down
2 changes: 1 addition & 1 deletion Example/Shared/DemoPages/GridSelectDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct GridSelectDemo: View {
}
.padding()
}
.navigationBarTitle("Grid select", displayMode: .inline)
.navigationTitle("Grid select")
}
}

Expand Down
11 changes: 3 additions & 8 deletions Example/Shared/DemoPages/IconsDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import OversizeUI
import SwiftUI

#if os(iOS)
struct IconsDemo: View {
let grid = [GridItem(),
GridItem(),
Expand All @@ -16,21 +17,14 @@ struct IconsDemo: View {
var body: some View {
PageView("Icons") {
LazyVGrid(columns: grid) {
ForEach(Icons.allCases, id: \.self) { icon in
ForEach(IconsNames.allCases, id: \.self) { icon in
Icon(icon)
.padding(.vertical)
}
}
.padding()
}
.modalable()
// .closeable()
//
//
// ScrollView {
//
// }
// .navigationBarTitle("Icons", displayMode: .inline)
}
}

Expand All @@ -39,3 +33,4 @@ struct IconsDemo_Previews: PreviewProvider {
IconsDemo()
}
}
#endif
2 changes: 2 additions & 0 deletions Example/Shared/DemoPages/PageDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import OversizeUI
import SwiftUI

#if os(iOS)
struct PageDemo: View {
@Environment(\.screenSize) var screenSize
@State var isShowModal = false
Expand Down Expand Up @@ -54,3 +55,4 @@ struct PageDemo_Previews: PreviewProvider {
PageDemo()
}
}
#endif
2 changes: 1 addition & 1 deletion Example/Shared/DemoPages/SegmentedControlDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct SegmentedControlDemo: View {
.controlRadius(.xLarge)
}
}.padding()
}.navigationBarTitle("Segmented control", displayMode: .inline)
}.navigationTitle("Segmented control")
}
}

Expand Down
3 changes: 2 additions & 1 deletion Example/Shared/DemoPages/SurfaceDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ struct SurfaceDemo: View {
.elevation(.z1)
}
.padding()
}.navigationBarTitle("Surface", displayMode: .inline)
}
.navigationTitle("Surface")
}
}

Expand Down
4 changes: 3 additions & 1 deletion Example/Shared/DemoPages/TextFieldDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ struct TextFieldDemo: View {
.helper(.constant("Error"), style: .constant(.errorText))

}.padding()
}.navigationBarTitle("Text fields", displayMode: .inline)
}

.navigationTitle("Text fields")
}
}

Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ let package = Package(
defaultLocalization: "en",
platforms: [
.iOS(.v14),
.macOS(.v11),
.macOS(.v12),
.tvOS(.v14),
.watchOS(.v7),
.watchOS(.v8),
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
Expand Down
13 changes: 5 additions & 8 deletions Sources/OversizeUI/Controls/ContentView/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public struct ContentView: View {
private let primaryButton: ContenButtonType?
private let secondaryButton: ContenButtonType?


public init(image: Image?,
title: String,
subtitle: String?,
Expand All @@ -50,11 +49,10 @@ public struct ContentView: View {
}

TextBox(title: title, subtitle: subtitle)

primaryButtonView()

secondaryButtonView()

}
}

Expand Down Expand Up @@ -131,12 +129,12 @@ extension ContentView {
}
.style(.gray)
.disabled(true)

case .none:
EmptyView()
}
}

@ViewBuilder
private func secondaryButtonView() -> some View {
switch secondaryButton {
Expand Down Expand Up @@ -196,10 +194,9 @@ extension ContentView {
}
.style(.gray)
.disabled(true)

case .none:
EmptyView()
}
}
}

Loading

0 comments on commit 47b7c03

Please sign in to comment.