Skip to content

Commit 8a1ed1c

Browse files
authored
Merge pull request #12 from KvColorPalette/bugfix/fixing-app-store-review-changes
Bugfix/fixing app store review changes
2 parents 1b9c710 + 3a609c9 commit 8a1ed1c

File tree

6 files changed

+103
-12
lines changed

6 files changed

+103
-12
lines changed
Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
version = "1.3">
4-
<BuildAction>
3+
version = "1.7">
4+
<BuildAction
5+
parallelizeBuildables = "YES"
6+
buildImplicitDependencies = "YES">
57
<BuildActionEntries>
68
<BuildActionEntry
7-
buildForRunning = "YES">
9+
buildForTesting = "YES"
10+
buildForRunning = "YES"
11+
buildForProfiling = "YES"
12+
buildForArchiving = "YES"
13+
buildForAnalyzing = "YES">
814
<BuildableReference
915
BuildableIdentifier = "primary"
1016
BlueprintIdentifier = "5ADA3FFF2D1F257F0060DB60"
@@ -15,11 +21,25 @@
1521
</BuildActionEntry>
1622
</BuildActionEntries>
1723
</BuildAction>
24+
<TestAction
25+
buildConfiguration = "Debug"
26+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28+
shouldUseLaunchSchemeArgsEnv = "YES"
29+
shouldAutocreateTestPlan = "YES">
30+
</TestAction>
1831
<LaunchAction
19-
useCustomWorkingDirectory = "NO"
2032
buildConfiguration = "Debug"
33+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
34+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
35+
launchStyle = "0"
36+
useCustomWorkingDirectory = "NO"
37+
ignoresPersistentStateOnLaunch = "NO"
38+
debugDocumentVersioning = "YES"
39+
debugServiceExtension = "internal"
2140
allowLocationSimulation = "YES">
22-
<BuildableProductRunnable>
41+
<BuildableProductRunnable
42+
runnableDebuggingMode = "0">
2343
<BuildableReference
2444
BuildableIdentifier = "primary"
2545
BlueprintIdentifier = "5ADA3FFF2D1F257F0060DB60"
@@ -29,4 +49,18 @@
2949
</BuildableReference>
3050
</BuildableProductRunnable>
3151
</LaunchAction>
52+
<ProfileAction
53+
buildConfiguration = "Release"
54+
shouldUseLaunchSchemeArgsEnv = "YES"
55+
savedToolIdentifier = ""
56+
useCustomWorkingDirectory = "NO"
57+
debugDocumentVersioning = "YES">
58+
</ProfileAction>
59+
<AnalyzeAction
60+
buildConfiguration = "Debug">
61+
</AnalyzeAction>
62+
<ArchiveAction
63+
buildConfiguration = "Release"
64+
revealArchiveInOrganizer = "YES">
65+
</ArchiveAction>
3266
</Scheme>

KvColorPalette-iOS-App.xcodeproj/xcuserdata/kavi.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>KvColorPalette-App.xcscheme</key>
1818
<dict>
1919
<key>orderHint</key>
20-
<integer>2</integer>
20+
<integer>0</integer>
2121
</dict>
2222
<key>kv-ios-color-pallet-app.xcscheme_^#shared#^_</key>
2323
<dict>

KvColorPalette-iOS-App/ui/common/CommonPaletteUI.swift

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,38 @@ public struct ColorBox: View {
1414
private var givenColor: Color = .blue
1515
private var selectedColor: Color? = nil
1616
private var onSelect: (Color) -> Void
17+
private var boxWidth: CGFloat = 32
18+
private var boxHeight: CGFloat = 32
1719

1820
public init (givenColor: Color, selectedColor: Color? = nil, onSelect: @escaping (Color) -> Void) {
1921
self.givenColor = givenColor
2022
self.selectedColor = selectedColor
2123
self.onSelect = onSelect
24+
25+
switch UIUtil.getScreenType() {
26+
case .MINI_SCREEN:
27+
boxWidth = 28
28+
boxHeight = 24
29+
break
30+
case .AVERAGE_SCREEN:
31+
boxWidth = 30
32+
boxHeight = 30
33+
break
34+
case .PLUS_SCREEN:
35+
boxWidth = 36
36+
boxHeight = 36
37+
break
38+
case .MAX_SCREEN:
39+
boxWidth = 38
40+
boxHeight = 38
41+
break
42+
}
2243
}
2344

2445
public var body: some View {
2546
Rectangle()
2647
.fill(givenColor)
27-
.frame(width: 32, height: 32)
48+
.frame(width: boxWidth, height: boxHeight)
2849
.border(showBorder ? Color.white : .clear, width: 2)
2950
.onTapGesture {
3051
showBorder.toggle()
@@ -55,7 +76,7 @@ public struct ColorDetailRow: View {
5576
.stroke(Color.themePalette.primary, lineWidth: 1)
5677
.fill(selectedColorList.count >= 1 ? selectedColorList[0] : Color.white)
5778
.frame(width: 50, height: 50)
58-
.padding([.top, .leading, .trailing], 6)
79+
.padding([.leading, .trailing], 6)
5980
HStack {
6081
Text("\(ColorUtil.getHex(color: selectedColorList.count >= 1 ? selectedColorList[0] : Color.white))")
6182
.textSelection(.enabled)
@@ -69,7 +90,7 @@ public struct ColorDetailRow: View {
6990
.stroke(Color.themePalette.primary, lineWidth: 1)
7091
.fill(selectedColorList.count >= 2 ? selectedColorList[1] : Color.white)
7192
.frame(width: 50, height: 50)
72-
.padding([.top, .leading, .trailing], 6)
93+
.padding([.leading, .trailing], 6)
7394

7495
HStack {
7596
Text("\(ColorUtil.getHex(color: selectedColorList.count >= 2 ? selectedColorList[1] : Color.white))")
@@ -84,7 +105,7 @@ public struct ColorDetailRow: View {
84105
.stroke(Color.themePalette.primary, lineWidth: 1)
85106
.fill(selectedColorList.count >= 3 ? selectedColorList[2] : Color.white)
86107
.frame(width: 50, height: 50)
87-
.padding([.top, .leading, .trailing], 6)
108+
.padding([.leading, .trailing], 6)
88109

89110
HStack {
90111
Text("\(ColorUtil.getHex(color: selectedColorList.count >= 3 ? selectedColorList[2] : Color.white))")
@@ -99,7 +120,7 @@ public struct ColorDetailRow: View {
99120
.stroke(Color.themePalette.primary, lineWidth: 1)
100121
.fill(selectedColorList.count >= 4 ? selectedColorList[3] : Color.white)
101122
.frame(width: 50, height: 50)
102-
.padding([.top, .leading, .trailing], 6)
123+
.padding([.leading, .trailing], 6)
103124

104125
HStack {
105126
Text("\(ColorUtil.getHex(color: selectedColorList.count >= 4 ? selectedColorList[3] : Color.white))")
@@ -114,7 +135,7 @@ public struct ColorDetailRow: View {
114135
.stroke(Color.themePalette.primary, lineWidth: 1)
115136
.fill(selectedColorList.count >= 5 ? selectedColorList[4] : Color.white)
116137
.frame(width: 50, height: 50)
117-
.padding([.top, .leading, .trailing], 6)
138+
.padding([.leading, .trailing], 6)
118139

119140
HStack {
120141
Text("\(ColorUtil.getHex(color: selectedColorList.count >= 5 ? selectedColorList[4] : Color.white))")
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//
2+
// ScreenType.swift
3+
// KvColorPalette-App
4+
//
5+
// Created by Kavimal Wijewardana on 6/30/25.
6+
//
7+
public enum ScreenType {
8+
case MINI_SCREEN, AVERAGE_SCREEN, PLUS_SCREEN, MAX_SCREEN
9+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//
2+
// UIUtil.swift
3+
// KvColorPalette-App
4+
//
5+
// Created by Kavimal Wijewardana on 6/30/25.
6+
//
7+
import Foundation
8+
import SwiftUI
9+
10+
public class UIUtil {
11+
12+
public static func getScreenType() -> ScreenType {
13+
let size = UIScreen.main.bounds.size
14+
15+
if size.height <= 667 {
16+
return ScreenType.MINI_SCREEN
17+
} else if size.height <= 852 {
18+
return ScreenType.AVERAGE_SCREEN
19+
} else if size.height <= 932 {
20+
return ScreenType.PLUS_SCREEN
21+
} else if size.height <= 956 {
22+
return ScreenType.MAX_SCREEN
23+
} else {
24+
return ScreenType.AVERAGE_SCREEN
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)