Skip to content

Commit

Permalink
Release 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
3ph committed Dec 7, 2017
1 parent 318a807 commit 91fab33
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 44 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0
2 changes: 1 addition & 1 deletion CollectionPickerView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'CollectionPickerView'
s.version = '0.1.0'
s.version = '0.1.1'
s.summary = 'A generic customizable picker view based on UICollectionView.'

s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion CollectionPickerView/Classes/CollectionPickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class CollectionPickerView: UIView {
}
}

/// Readwrite. A float value which determines the perspective representation which used when using AKPickerViewStyle.Wheel style.
/// Readwrite. A float value which determines the perspective representation which used when using wheel style.
@IBInspectable public var viewDepth: CGFloat = 2000 {
didSet {
didSetViewDepth()
Expand Down
48 changes: 39 additions & 9 deletions Example/CollectionPickerView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0820;
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0820;
LastSwiftMigration = 0910;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0820;
LastSwiftMigration = 0910;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
Expand Down Expand Up @@ -270,13 +270,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-CollectionPickerView_Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
7B5108C65AF96DF9486093CB /* [CP] Copy Pods Resources */ = {
Expand All @@ -300,13 +303,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-CollectionPickerView_Tests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
A5F4317E1E94A2D78783AD4E /* [CP] Copy Pods Resources */ = {
Expand All @@ -330,9 +336,12 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-CollectionPickerView_Example/Pods-CollectionPickerView_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/CollectionPickerView/CollectionPickerView.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CollectionPickerView.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand All @@ -345,9 +354,14 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-CollectionPickerView_Tests/Pods-CollectionPickerView_Tests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework",
"${BUILT_PRODUCTS_DIR}/Quick/Quick.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -412,14 +426,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -459,14 +479,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -501,7 +527,8 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -515,7 +542,8 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -535,7 +563,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -551,7 +580,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Release;
};
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 = "0820"
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -40,6 +40,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -69,6 +70,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
20 changes: 18 additions & 2 deletions Example/CollectionPickerView/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,28 @@ class ViewController: UIViewController {
// Uncomment to prevent selection on scroll
//pickerView.selectCenter = false

// Uncomment to set spacing between cells, default 10
//pickerView.cellSpacing = 10

// Uncomment to set cell size (width for horizontal, height for vertical style), default 100
//pickerView.cellSize = 100

// Uncomment to set wheel effect perspective representation
//pickerView.viewDepth = 2000

// Uncomment to enable/disable fading gradient mask
//pickerView.maskDisabled = false

// Current selected index might be obtained from selectedIndex
//NSLog("\(pickerView.selectedIndex)")

// Reload the picker view
pickerView.reloadData()
}

fileprivate func sizeForString(_ string: NSString) -> CGSize {
let size = string.size(attributes: [NSFontAttributeName: self.font])
let highlightedSize = string.size(attributes: [NSFontAttributeName: self.highlightedFont])
let size = string.size(withAttributes: [NSAttributedStringKey.font: self.font])
let highlightedSize = string.size(withAttributes: [NSAttributedStringKey.font: self.highlightedFont])
return CGSize(
width: ceil(max(size.width, highlightedSize.width)),
height: ceil(max(size.height, highlightedSize.height)))
Expand Down
7 changes: 3 additions & 4 deletions Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
use_frameworks!
platform :ios, '8.3'

target 'CollectionPickerView_Example' do
pod 'CollectionPickerView', :path => '../'

target 'CollectionPickerView_Tests' do
inherit! :search_paths

pod 'Quick', '~> 1.0.0'
pod 'Nimble', '~> 5.1.1'
pod 'FBSnapshotTestCase'
pod 'Nimble-Snapshots', '= 4.4.0'
pod 'Quick', '~> 1.2.0'
pod 'Nimble', '~> 7.0.2'
end
end
35 changes: 10 additions & 25 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,37 +1,22 @@
PODS:
- CollectionPickerView (0.1.0)
- FBSnapshotTestCase (2.1.4):
- FBSnapshotTestCase/SwiftSupport (= 2.1.4)
- FBSnapshotTestCase/Core (2.1.4)
- FBSnapshotTestCase/SwiftSupport (2.1.4):
- FBSnapshotTestCase/Core
- Nimble (5.1.1)
- Nimble-Snapshots (4.4.0):
- Nimble-Snapshots/Core (= 4.4.0)
- Nimble-Snapshots/Core (4.4.0):
- FBSnapshotTestCase (~> 2.0)
- Nimble
- Quick
- Quick (1.0.0)
- CollectionPickerView (0.1.1)
- Nimble (7.0.3)
- Quick (1.2.0)

DEPENDENCIES:
- CollectionPickerView (from `../`)
- FBSnapshotTestCase
- Nimble (~> 5.1.1)
- Nimble-Snapshots (= 4.4.0)
- Quick (~> 1.0.0)
- Nimble (~> 7.0.2)
- Quick (~> 1.2.0)

EXTERNAL SOURCES:
CollectionPickerView:
:path: ../

SPEC CHECKSUMS:
CollectionPickerView: 26dc7c8d718e54da3d4f331852f2d8f6de945088
FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a
Nimble: 415e3aa3267e7bc2c96b05fa814ddea7bb686a29
Nimble-Snapshots: e743439f26c2fa99d8f7e0d7c01c99bcb40aa6f2
Quick: 8024e4a47e6cc03a9d5245ef0948264fc6d27cff
CollectionPickerView: c4de5bd7d34b8dc76cb79a2075a81142ab2835b7
Nimble: 7f5a9c447a33002645a071bddafbfb24ea70e0ac
Quick: 58d203b1c5e27fff7229c4c1ae445ad7069a7a08

PODFILE CHECKSUM: 1e18e55c0c9b612a15fdc8270712cf6a1dab31dd
PODFILE CHECKSUM: 4fa0d8f0d982f4b04b40923b21afa088acc92b3e

COCOAPODS: 1.2.1
COCOAPODS: 1.4.0.beta.2
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Version](https://img.shields.io/cocoapods/v/CollectionPickerView.svg?style=flat)](http://cocoapods.org/pods/CollectionPickerView)
[![License](https://img.shields.io/cocoapods/l/CollectionPickerView.svg?style=flat)](http://cocoapods.org/pods/CollectionPickerView)
[![Platform](https://img.shields.io/cocoapods/p/CollectionPickerView.svg?style=flat)](http://cocoapods.org/pods/CollectionPickerView)
![Swift](https://img.shields.io/badge/%20in-swift%204.0-orange.svg)


Generic and customizable picker based on UICollectionView. Picker cells are fully
Expand Down Expand Up @@ -33,7 +34,7 @@ pod "CollectionPickerView"

## Author

3ph, instantni.med@gmail.com
Tomas Friml, instantni.med@gmail.com

## License

Expand Down

0 comments on commit 91fab33

Please sign in to comment.