Skip to content

Commit

Permalink
Bug fix if empty data passed (#49)
Browse files Browse the repository at this point in the history
* Check if data for component is not empty

* Bump patch 2.0.1 🚀
  • Loading branch information
kmcgill88 committed Apr 9, 2019
1 parent 474d6f4 commit 386be6b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Example/McPicker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
Expand All @@ -231,6 +231,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -406,6 +407,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -462,6 +464,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
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 = "1000"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1000"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion McPicker.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'McPicker'
s.version = '2.0.0'
s.version = '2.0.1'
s.summary = 'McPicker is a customizable, closure driven UIPickerView drop-in solution with animations that is rotation ready.'
s.swift_version = '4.2'

Expand Down
2 changes: 1 addition & 1 deletion McPicker/Classes/McPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ extension McPicker : UIPickerViewDelegate {
}

public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
if component < pickerSelection.count {
if !pickerData[component].isEmpty {
self.pickerSelection[component] = pickerData[component][row]
self.selectionChangedHandler?(self.pickerSelection, component)
}
Expand Down

0 comments on commit 386be6b

Please sign in to comment.