Skip to content

Commit

Permalink
Adding pickerWasDismissed(picker:) to `PickerNavigationControllerDe…
Browse files Browse the repository at this point in the history
…legate` protocol.
  • Loading branch information
rnine committed Oct 15, 2021
1 parent 048228d commit f2cfc0e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Demo/FilestackDemo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,9 @@ extension ViewController: PickerNavigationControllerDelegate {
func pickerReportedUploadProgress(picker: PickerNavigationController, progress: Float) {
print("Picker \(picker) reported upload progress: \(progress)")
}

/// Called after the picker was dismissed.
func pickerWasDismissed(picker: PickerNavigationController) {
print("Picker \(picker) was dismissed.")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ import UIKit

/// The picker delegate. Optional
@objc public weak var pickerDelegate: PickerNavigationControllerDelegate?

deinit {
pickerDelegate?.pickerWasDismissed?(picker: self)
}
}

/// This protocol contains the function signatures any `PickerNavigationController` delegate should conform to.
Expand All @@ -40,6 +44,9 @@ import UIKit

/// Called when the picker reports progress during a file or set of files being uploaded.
@objc optional func pickerReportedUploadProgress(picker: PickerNavigationController, progress: Float)

/// Called after the picker was dismissed.
@objc optional func pickerWasDismissed(picker: PickerNavigationController)
}

extension PickerNavigationController: StylizerDelegate {
Expand Down

0 comments on commit f2cfc0e

Please sign in to comment.