Skip to content

Commit 386be6b

Browse files
authored
Bug fix if empty data passed (#49)
* Check if data for component is not empty * Bump patch 2.0.1 🚀
1 parent 474d6f4 commit 386be6b

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

Example/McPicker.xcodeproj/project.pbxproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
isa = PBXProject;
213213
attributes = {
214214
LastSwiftUpdateCheck = 0720;
215-
LastUpgradeCheck = 1000;
215+
LastUpgradeCheck = 1020;
216216
ORGANIZATIONNAME = CocoaPods;
217217
TargetAttributes = {
218218
607FACCF1AFB9204008FA782 = {
@@ -231,6 +231,7 @@
231231
developmentRegion = English;
232232
hasScannedForEncodings = 0;
233233
knownRegions = (
234+
English,
234235
en,
235236
Base,
236237
);
@@ -406,6 +407,7 @@
406407
isa = XCBuildConfiguration;
407408
buildSettings = {
408409
ALWAYS_SEARCH_USER_PATHS = NO;
410+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
409411
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
410412
CLANG_CXX_LIBRARY = "libc++";
411413
CLANG_ENABLE_MODULES = YES;
@@ -462,6 +464,7 @@
462464
isa = XCBuildConfiguration;
463465
buildSettings = {
464466
ALWAYS_SEARCH_USER_PATHS = NO;
467+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
465468
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
466469
CLANG_CXX_LIBRARY = "libc++";
467470
CLANG_ENABLE_MODULES = YES;

Example/McPicker.xcodeproj/xcshareddata/xcschemes/McPicker-Example.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Example/McPicker.xcodeproj/xcshareddata/xcschemes/McPicker_Tests.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

McPicker.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'McPicker'
3-
s.version = '2.0.0'
3+
s.version = '2.0.1'
44
s.summary = 'McPicker is a customizable, closure driven UIPickerView drop-in solution with animations that is rotation ready.'
55
s.swift_version = '4.2'
66

McPicker/Classes/McPicker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ extension McPicker : UIPickerViewDelegate {
439439
}
440440

441441
public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
442-
if component < pickerSelection.count {
442+
if !pickerData[component].isEmpty {
443443
self.pickerSelection[component] = pickerData[component][row]
444444
self.selectionChangedHandler?(self.pickerSelection, component)
445445
}

0 commit comments

Comments
 (0)