PSPDFDownloadManagerDelegate
Objective-C
@protocol PSPDFDownloadManagerDelegate<NSObject>
@optional
/// If the delegate wants to handle authentication challenges.
- (void)downloadManager:(PSPDFDownloadManager *)downloadManager authenticationChallenge:(NSURLAuthenticationChallenge *)authenticationChallenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler;
/// Informs the delegate that the state of the given object has changed.
///
/// @param downloadManager The download manager.
/// @param object The changed object.
- (void)downloadManager:(PSPDFDownloadManager *)downloadManager didChangeObject:(id<PSPDFRemoteContentObject>)object;
/// Informs the delegate that the reachability has changed.
///
/// @param downloadManager The download manager.
/// @param reachability The new reachability.
- (void)downloadManager:(PSPDFDownloadManager *)downloadManager reachabilityDidChange:(PSPDFReachability)reachability;
@end
Swift
protocol DownloadManagerDelegate : NSObjectProtocol
Undocumented
-
If the delegate wants to handle authentication challenges.
Declaration
Objective-C
- (void)downloadManager:(nonnull PSPDFDownloadManager *)downloadManager authenticationChallenge: (nonnull NSURLAuthenticationChallenge *)authenticationChallenge completionHandler: (nonnull void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *_Nonnull))completionHandler;
Swift
optional func downloadManager(_ downloadManager: DownloadManager, authenticationChallenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential) -> Void)
-
Informs the delegate that the state of the given object has changed.
Declaration
Objective-C
- (void)downloadManager:(nonnull PSPDFDownloadManager *)downloadManager didChangeObject:(nonnull id<PSPDFRemoteContentObject>)object;
Parameters
downloadManager
The download manager.
object
The changed object.
-
Informs the delegate that the reachability has changed.
Declaration
Objective-C
- (void)downloadManager:(nonnull PSPDFDownloadManager *)downloadManager reachabilityDidChange:(PSPDFReachability)reachability;
Swift
optional func downloadManager(_ downloadManager: DownloadManager, reachabilityDidChange reachability: ReachabilityStatus)
Parameters
downloadManager
The download manager.
reachability
The new reachability.