Skip to content

Commit

Permalink
fix public declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
priore committed Feb 5, 2018
1 parent 977113e commit 610b95c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0
14 changes: 7 additions & 7 deletions DPPickerManager/Class/DPPickerManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

import UIKit

typealias DPPickerCompletion = (_ cancel: Bool) -> Void
typealias DPPickerDateCompletion = (_ date: Date?, _ cancel: Bool) -> Void
typealias DPPickerValueIndexCompletion = (_ value: String?, _ index: Int, _ cancel: Bool) -> Void
public typealias DPPickerCompletion = (_ cancel: Bool) -> Void
public typealias DPPickerDateCompletion = (_ date: Date?, _ cancel: Bool) -> Void
public typealias DPPickerValueIndexCompletion = (_ value: String?, _ index: Int, _ cancel: Bool) -> Void

class DPPickerManager: NSObject, UIPickerViewDelegate, UIPickerViewDataSource {
public class DPPickerManager: NSObject, UIPickerViewDelegate, UIPickerViewDataSource {

static let shared = DPPickerManager()

Expand Down Expand Up @@ -139,15 +139,15 @@ class DPPickerManager: NSObject, UIPickerViewDelegate, UIPickerViewDataSource {

// MARK: - Picker Delegates

internal func numberOfComponents(in pickerView: UIPickerView) -> Int {
public func numberOfComponents(in pickerView: UIPickerView) -> Int {
return pickerValues?.count == 0 ? 0 : 1
}

internal func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return pickerValues?.count ?? 0
}

internal func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
public func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
return pickerValues?[row]
}

Expand Down

0 comments on commit 610b95c

Please sign in to comment.