ارفع راسك فوق انته سوري حر ... :green_heart::green_heart:

Skip to content
Snippets Groups Projects
Commit 0fdb8749 authored by Mustafa Merza's avatar Mustafa Merza
Browse files

- Added using color style in some UIKit views and view controllers.

parent 83b90200
Branches
No related tags found
No related merge requests found
Showing
with 135 additions and 9 deletions
...@@ -201,6 +201,9 @@ ...@@ -201,6 +201,9 @@
675FF4F72C62327C00E42214 /* ShareType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 675FF4F62C62327C00E42214 /* ShareType.swift */; }; 675FF4F72C62327C00E42214 /* ShareType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 675FF4F62C62327C00E42214 /* ShareType.swift */; };
675FF4F92C6235F600E42214 /* ShareOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 675FF4F82C6235F600E42214 /* ShareOption.swift */; }; 675FF4F92C6235F600E42214 /* ShareOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 675FF4F82C6235F600E42214 /* ShareOption.swift */; };
676C30622C6C98EB00C29A43 /* ColorStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 676C30612C6C98EB00C29A43 /* ColorStyle.swift */; }; 676C30622C6C98EB00C29A43 /* ColorStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 676C30612C6C98EB00C29A43 /* ColorStyle.swift */; };
676C30652C6CA49B00C29A43 /* UIView+CustomColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 676C30642C6CA49B00C29A43 /* UIView+CustomColor.swift */; };
676C30682C6CA6D200C29A43 /* UIButton+CustomColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 676C30672C6CA6D200C29A43 /* UIButton+CustomColor.swift */; };
676C306A2C6CBF4100C29A43 /* UIDivider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 676C30692C6CBF4100C29A43 /* UIDivider.swift */; };
677E65AE2C5A10C20039E2C5 /* PersistentContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 677E65AD2C5A10C20039E2C5 /* PersistentContainer.swift */; }; 677E65AE2C5A10C20039E2C5 /* PersistentContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 677E65AD2C5A10C20039E2C5 /* PersistentContainer.swift */; };
677E65B02C5A11800039E2C5 /* CoreDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 677E65AF2C5A11800039E2C5 /* CoreDataManager.swift */; }; 677E65B02C5A11800039E2C5 /* CoreDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 677E65AF2C5A11800039E2C5 /* CoreDataManager.swift */; };
677E65B62C5A13F00039E2C5 /* ScanSessionDependencyManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 677E65B52C5A13F00039E2C5 /* ScanSessionDependencyManager.swift */; }; 677E65B62C5A13F00039E2C5 /* ScanSessionDependencyManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 677E65B52C5A13F00039E2C5 /* ScanSessionDependencyManager.swift */; };
...@@ -518,6 +521,9 @@ ...@@ -518,6 +521,9 @@
675FF4F62C62327C00E42214 /* ShareType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareType.swift; sourceTree = "<group>"; }; 675FF4F62C62327C00E42214 /* ShareType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareType.swift; sourceTree = "<group>"; };
675FF4F82C6235F600E42214 /* ShareOption.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareOption.swift; sourceTree = "<group>"; }; 675FF4F82C6235F600E42214 /* ShareOption.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareOption.swift; sourceTree = "<group>"; };
676C30612C6C98EB00C29A43 /* ColorStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorStyle.swift; sourceTree = "<group>"; }; 676C30612C6C98EB00C29A43 /* ColorStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorStyle.swift; sourceTree = "<group>"; };
676C30642C6CA49B00C29A43 /* UIView+CustomColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+CustomColor.swift"; sourceTree = "<group>"; };
676C30672C6CA6D200C29A43 /* UIButton+CustomColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+CustomColor.swift"; sourceTree = "<group>"; };
676C30692C6CBF4100C29A43 /* UIDivider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIDivider.swift; sourceTree = "<group>"; };
677E65AD2C5A10C20039E2C5 /* PersistentContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersistentContainer.swift; sourceTree = "<group>"; }; 677E65AD2C5A10C20039E2C5 /* PersistentContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersistentContainer.swift; sourceTree = "<group>"; };
677E65AF2C5A11800039E2C5 /* CoreDataManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreDataManager.swift; sourceTree = "<group>"; }; 677E65AF2C5A11800039E2C5 /* CoreDataManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreDataManager.swift; sourceTree = "<group>"; };
677E65B52C5A13F00039E2C5 /* ScanSessionDependencyManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScanSessionDependencyManager.swift; sourceTree = "<group>"; }; 677E65B52C5A13F00039E2C5 /* ScanSessionDependencyManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScanSessionDependencyManager.swift; sourceTree = "<group>"; };
...@@ -1298,6 +1304,7 @@ ...@@ -1298,6 +1304,7 @@
676C30552C6C95AB00C29A43 /* Extensions */ = { 676C30552C6C95AB00C29A43 /* Extensions */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
676C30632C6CA48500C29A43 /* UIView */,
67807F9C2C49348B00D1F168 /* View */, 67807F9C2C49348B00D1F168 /* View */,
672C46D82C48017C00497EF0 /* Style */, 672C46D82C48017C00497EF0 /* Style */,
672C46492C47BD8800497EF0 /* String+StringKeys.swift */, 672C46492C47BD8800497EF0 /* String+StringKeys.swift */,
...@@ -1334,6 +1341,7 @@ ...@@ -1334,6 +1341,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
67A2AF762C6B6F7700039F30 /* NoIndicatorsScrollView.swift */, 67A2AF762C6B6F7700039F30 /* NoIndicatorsScrollView.swift */,
676C30692C6CBF4100C29A43 /* UIDivider.swift */,
); );
path = Common; path = Common;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1404,6 +1412,15 @@ ...@@ -1404,6 +1412,15 @@
path = Styles; path = Styles;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
676C30632C6CA48500C29A43 /* UIView */ = {
isa = PBXGroup;
children = (
676C30642C6CA49B00C29A43 /* UIView+CustomColor.swift */,
676C30672C6CA6D200C29A43 /* UIButton+CustomColor.swift */,
);
path = UIView;
sourceTree = "<group>";
};
677E65AC2C5A10980039E2C5 /* CoreData */ = { 677E65AC2C5A10980039E2C5 /* CoreData */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -1947,6 +1964,7 @@ ...@@ -1947,6 +1964,7 @@
53014FA02C11A8E80071CE39 /* MultiPageScanSession.swift in Sources */, 53014FA02C11A8E80071CE39 /* MultiPageScanSession.swift in Sources */,
539996502C26E86700671340 /* CDOverlayView.m in Sources */, 539996502C26E86700671340 /* CDOverlayView.m in Sources */,
53014F9A2C11A8E80071CE39 /* CIImage+Utils.swift in Sources */, 53014F9A2C11A8E80071CE39 /* CIImage+Utils.swift in Sources */,
676C306A2C6CBF4100C29A43 /* UIDivider.swift in Sources */,
53D9D1C42C1AF521004D1C1C /* UIView+Constraints.swift in Sources */, 53D9D1C42C1AF521004D1C1C /* UIView+Constraints.swift in Sources */,
53CD5F5E2C1505EC0010424B /* UIWindow.swift in Sources */, 53CD5F5E2C1505EC0010424B /* UIWindow.swift in Sources */,
EC8A9B17254DCC2900F9AF99 /* URL+Extensions.swift in Sources */, EC8A9B17254DCC2900F9AF99 /* URL+Extensions.swift in Sources */,
...@@ -2049,6 +2067,7 @@ ...@@ -2049,6 +2067,7 @@
677E65E32C5A36870039E2C5 /* GetScanSessionsUseCase.swift in Sources */, 677E65E32C5A36870039E2C5 /* GetScanSessionsUseCase.swift in Sources */,
53F21F8B2C1246AF00172BFC /* AllFolderTableViewCell.swift in Sources */, 53F21F8B2C1246AF00172BFC /* AllFolderTableViewCell.swift in Sources */,
53014FBD2C11A8E80071CE39 /* CaptureSession+Focus.swift in Sources */, 53014FBD2C11A8E80071CE39 /* CaptureSession+Focus.swift in Sources */,
676C30652C6CA49B00C29A43 /* UIView+CustomColor.swift in Sources */,
5399969C2C27130000671340 /* ConstraintItem.swift in Sources */, 5399969C2C27130000671340 /* ConstraintItem.swift in Sources */,
53014F982C11A8E80071CE39 /* URL+Utils.swift in Sources */, 53014F982C11A8E80071CE39 /* URL+Utils.swift in Sources */,
EC8A9B00254DBFC700F9AF99 /* UserDefaults+Extensions.swift in Sources */, EC8A9B00254DBFC700F9AF99 /* UserDefaults+Extensions.swift in Sources */,
...@@ -2114,6 +2133,7 @@ ...@@ -2114,6 +2133,7 @@
EC8A9B1D254DCEC600F9AF99 /* File.swift in Sources */, EC8A9B1D254DCEC600F9AF99 /* File.swift in Sources */,
67807F8C2C48F49B00D1F168 /* HandleAppLanguageUseCase.swift in Sources */, 67807F8C2C48F49B00D1F168 /* HandleAppLanguageUseCase.swift in Sources */,
67A20DE12C57BC56009D2F25 /* DocumentsCollectionViewCell.swift in Sources */, 67A20DE12C57BC56009D2F25 /* DocumentsCollectionViewCell.swift in Sources */,
676C30682C6CA6D200C29A43 /* UIButton+CustomColor.swift in Sources */,
53E7D33A2C1B00880025A1D3 /* FSPageControl.swift in Sources */, 53E7D33A2C1B00880025A1D3 /* FSPageControl.swift in Sources */,
EC8A9B24254DE72F00F9AF99 /* UIView+Extensions.swift in Sources */, EC8A9B24254DE72F00F9AF99 /* UIView+Extensions.swift in Sources */,
EC0CF200254D8BBF00888722 /* SceneDelegate.swift in Sources */, EC0CF200254D8BBF00888722 /* SceneDelegate.swift in Sources */,
......
...@@ -16,7 +16,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -16,7 +16,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
IQKeyboardManager.shared.enable = true IQKeyboardManager.shared.enable = true
IQKeyboardManager.shared.resignOnTouchOutside = true IQKeyboardManager.shared.resignOnTouchOutside = true
IQKeyboardManager.shared.toolbarConfiguration.previousNextDisplayMode = .alwaysShow IQKeyboardManager.shared.toolbarConfiguration.previousNextDisplayMode = .alwaysShow
IQKeyboardManager.shared.toolbarConfiguration.tintColor = .mainBlue IQKeyboardManager.shared.toolbarConfiguration.tintColor = ColorStyle.primary.uiColor
return true return true
} }
......
...@@ -45,12 +45,12 @@ extension UIImage { ...@@ -45,12 +45,12 @@ extension UIImage {
static let photoStack = UIImage(systemName: "photo.stack") static let photoStack = UIImage(systemName: "photo.stack")
static let share = UIImage(systemName: "square.and.arrow.up")?.tint(with: .mainBlue) static let share = UIImage(systemName: "square.and.arrow.up")?.tint(with: .primary)
static let eye = UIImage(systemName: "eye") static let eye = UIImage(systemName: "eye")
static let camera = UIImage(systemName: "camera") static let camera = UIImage(systemName: "camera")
static let photo = UIImage(systemName: "photo") static let photo = UIImage(systemName: "photo")
static let checkmarkCircleFill = UIImage(systemName: "checkmark.circle.fill")?.tint(with: .mainBlue) static let checkmarkCircleFill = UIImage(systemName: "checkmark.circle.fill")?.tint(with: .primary)
} }
//
// UIButton+CustomColor.swift
// MiniScanner
//
// Created by Mustafa Merza on 8/14/24.
// Copyright © 2024 AppsNectar. All rights reserved.
//
import Foundation
extension UIButton {
func customTitleColor(_ color: ColorStyle) {
setTitleColor(color.uiColor, for: .normal)
}
}
//
// UIView+CustomColor.swift
// MiniScanner
//
// Created by Mustafa Merza on 8/14/24.
// Copyright © 2024 AppsNectar. All rights reserved.
//
import Foundation
extension UIView {
func customBackground(_ color: ColorStyle) {
backgroundColor = color.uiColor
}
func customLayerBackground(_ color: ColorStyle) {
layer.backgroundColor = color.uiColor.cgColor
}
func customBorderColor(_ color: ColorStyle) {
borderColor = color.uiColor
}
func customTint(_ color: ColorStyle) {
tintColor = color.uiColor
}
}
//
// UIDivider.swift
// MiniScanner
//
// Created by Mustafa Merza on 8/14/24.
// Copyright © 2024 AppsNectar. All rights reserved.
//
import Foundation
class UIDivider: UIView {
override func awakeFromNib() {
super.awakeFromNib()
customBackground(.gray100)
}
}
...@@ -29,6 +29,9 @@ enum ColorStyle { ...@@ -29,6 +29,9 @@ enum ColorStyle {
case gray500 case gray500
case gray550 case gray550
case gray600 case gray600
case clear
case white
} }
extension ColorStyle { extension ColorStyle {
...@@ -71,6 +74,10 @@ extension ColorStyle { ...@@ -71,6 +74,10 @@ extension ColorStyle {
.gray550 .gray550
case .gray600: case .gray600:
.gray600 .gray600
case .clear:
.clear
case .white:
.white
} }
} }
} }
...@@ -115,6 +122,10 @@ extension ColorStyle { ...@@ -115,6 +122,10 @@ extension ColorStyle {
.gray550 .gray550
case .gray600: case .gray600:
.gray600 .gray600
case .clear:
.clear
case .white:
.white
} }
} }
} }
...@@ -8,5 +8,9 @@ ...@@ -8,5 +8,9 @@
"info" : { "info" : {
"author" : "xcode", "author" : "xcode",
"version" : 1 "version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"version" : 1 "version" : 1
}, },
"properties" : { "properties" : {
"preserves-vector-representation" : true "preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"version" : 1 "version" : 1
}, },
"properties" : { "properties" : {
"preserves-vector-representation" : true "preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"version" : 1 "version" : 1
}, },
"properties" : { "properties" : {
"preserves-vector-representation" : true "preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -8,5 +8,9 @@ ...@@ -8,5 +8,9 @@
"info" : { "info" : {
"author" : "xcode", "author" : "xcode",
"version" : 1 "version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -8,5 +8,9 @@ ...@@ -8,5 +8,9 @@
"info" : { "info" : {
"author" : "xcode", "author" : "xcode",
"version" : 1 "version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -8,5 +8,9 @@ ...@@ -8,5 +8,9 @@
"info" : { "info" : {
"author" : "xcode", "author" : "xcode",
"version" : 1 "version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -8,5 +8,9 @@ ...@@ -8,5 +8,9 @@
"info" : { "info" : {
"author" : "xcode", "author" : "xcode",
"version" : 1 "version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -8,5 +8,9 @@ ...@@ -8,5 +8,9 @@
"info" : { "info" : {
"author" : "xcode", "author" : "xcode",
"version" : 1 "version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"version" : 1 "version" : 1
}, },
"properties" : { "properties" : {
"preserves-vector-representation" : true "preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -8,5 +8,9 @@ ...@@ -8,5 +8,9 @@
"info" : { "info" : {
"author" : "xcode", "author" : "xcode",
"version" : 1 "version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"version" : 1 "version" : 1
}, },
"properties" : { "properties" : {
"template-rendering-intent" : "original" "preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"version" : 1 "version" : 1
}, },
"properties" : { "properties" : {
"preserves-vector-representation" : true "preserves-vector-representation" : true,
"template-rendering-intent" : "template"
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment