Skip to content

m13checkbox ver update #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Example/IGColorPicker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
9FAEF4144B69B4DE10AECF21 /* Pods-IGColorPicker_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IGColorPicker_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-IGColorPicker_Example/Pods-IGColorPicker_Example.release.xcconfig"; sourceTree = "<group>"; };
B249C39F1D8ABCE8C406EED6 /* Pods-IGColorPicker_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IGColorPicker_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-IGColorPicker_Tests/Pods-IGColorPicker_Tests.debug.xcconfig"; sourceTree = "<group>"; };
B5CB5F41429ED1420D267465 /* Pods-IGColorPicker_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IGColorPicker_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-IGColorPicker_Tests/Pods-IGColorPicker_Tests.release.xcconfig"; sourceTree = "<group>"; };
E6F4F3AABBDCF3FE8E4F59CF /* IGColorPicker.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = IGColorPicker.podspec; path = ../IGColorPicker.podspec; sourceTree = "<group>"; };
E6F4F3AABBDCF3FE8E4F59CF /* IGColorPicker.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = IGColorPicker.podspec; path = ../IGColorPicker.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -229,6 +229,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -270,7 +271,7 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-IGColorPicker_Example/Pods-IGColorPicker_Example-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-IGColorPicker_Example/Pods-IGColorPicker_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/IGColorPicker/IGColorPicker.framework",
"${BUILT_PRODUCTS_DIR}/M13Checkbox/M13Checkbox.framework",
);
Expand All @@ -281,7 +282,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-IGColorPicker_Example/Pods-IGColorPicker_Example-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-IGColorPicker_Example/Pods-IGColorPicker_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
20CE77970D77DC53168988A2 /* [CP] Check Pods Manifest.lock */ = {
Expand Down Expand Up @@ -410,7 +411,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -450,7 +451,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '8.3'
platform :ios, '11.0'
use_frameworks!

target 'IGColorPicker_Example' do
Expand Down
14 changes: 7 additions & 7 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- IGColorPicker (0.4.2):
- M13Checkbox (~> 3.2.0)
- M13Checkbox (3.2.2)
- IGColorPicker (0.4.3):
- M13Checkbox
- M13Checkbox (3.4.0)

DEPENDENCIES:
- IGColorPicker (from `../`)
Expand All @@ -15,9 +15,9 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
IGColorPicker: 518c7f1ccddd8b28bd6b1e552091240ef48039e5
M13Checkbox: a8c2491cfbbca10797925fd0b9154a782bf40d89
IGColorPicker: 5678a791e8ac0c6f1c07d3f58151d34c70bcc565
M13Checkbox: 6f59404540ac98ba83a3d1afac335895a40c6a5d

PODFILE CHECKSUM: 4ebb9ec0d26d8739b0c18dc9faaa5462d18e8245
PODFILE CHECKSUM: 37679cb6c192a18d2407f0b8487e4b9ce7d179ac

COCOAPODS: 1.5.3
COCOAPODS: 1.7.2
6 changes: 3 additions & 3 deletions IGColorPicker.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'IGColorPicker'
s.version = '0.4.2'
s.version = '0.4.3'
s.summary = 'A customizable color picker for iOS in Swift'

s.description = <<-DESC
Expand All @@ -12,9 +12,9 @@ s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Andrea Antonioni' => '[email protected]' }
s.source = { :git => 'https://github.com/iGenius-Srl/IGColorPicker.git', :tag => s.version.to_s }

s.ios.deployment_target = '8.3'
s.ios.deployment_target = '11.0'

s.source_files = 'IGColorPicker/Classes/**/*'

s.dependency 'M13Checkbox', '~> 3.2.0'
s.dependency 'M13Checkbox'
end
1 change: 1 addition & 0 deletions IGColorPicker/Classes/View/ColorPickerCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class ColorPickerCell: UICollectionViewCell {
// Setup of checkbox
checkbox.isUserInteractionEnabled = false
checkbox.backgroundColor = .clear
checkbox.secondaryTintColor = .clear
checkbox.hideBox = true
checkbox.setCheckState(.unchecked, animated: false)

Expand Down
12 changes: 11 additions & 1 deletion IGColorPicker/Classes/View/ColorPickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ open class ColorPickerView: UIView, UICollectionViewDelegate, UICollectionViewDa
open var style: ColorPickerViewStyle = .circle
/// Style applied when a color is selected
open var selectionStyle: ColorPickerViewSelectStyle = .check

/// Show selected cell's borders
open var showSelectedCellBorders: Bool = true

// MARK: - Private properties

fileprivate var _indexOfSelectedColor: Int?
Expand Down Expand Up @@ -132,6 +134,10 @@ open class ColorPickerView: UIView, UICollectionViewDelegate, UICollectionViewDa
}
return
}

if let selected = indexOfSelectedColor {
collectionView(self.collectionView, didDeselectItemAt: IndexPath(item: selected, section: 0))
}

_indexOfSelectedColor = indexPath.item

Expand Down Expand Up @@ -167,6 +173,10 @@ open class ColorPickerView: UIView, UICollectionViewDelegate, UICollectionViewDa
if style == .circle {
cell.layer.cornerRadius = cell.bounds.width / 2
}

if showSelectedCellBorders {
cell.checkbox.hideBox = false
}

return cell
}
Expand Down