Skip to content

Commit

Permalink
Add default value of completion parameter to enable func
Browse files Browse the repository at this point in the history
  • Loading branch information
k-lpmg committed Jun 27, 2019
1 parent a301f18 commit ed80cbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/PanSlip/PanSlip+UIView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extension PanSlip where Base: UIView {

// MARK: - Public methods

public func enable(slipDirection: PanSlipDirection, slipCompletion: (() -> Void)?) {
public func enable(slipDirection: PanSlipDirection, slipCompletion: (() -> Void)? = nil) {
self.slipDirection = slipDirection
self.slipCompletion = slipCompletion

Expand Down
2 changes: 1 addition & 1 deletion Sources/PanSlip/PanSlip+UIViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extension PanSlip where Base: UIViewController {

// MARK: - Public methods

public func enable(slipDirection: PanSlipDirection, slipCompletion: (() -> Void)?) {
public func enable(slipDirection: PanSlipDirection, slipCompletion: (() -> Void)? = nil) {
self.slipDirection = slipDirection
self.slipCompletion = slipCompletion

Expand Down

0 comments on commit ed80cbf

Please sign in to comment.