PLVDownloadManager

Objective-C

@interface PLVDownloadManager : NSObject

Swift

class PLVDownloadManager : NSObject

下载管理器(单例类)

可配置项

  • 最高下载并发数(默认,3个;可设置此值,自定义最大下载并发数)

    Declaration

    Objective-C

    @property (nonatomic) NSInteger maxConcurrentDownloads;

    Swift

    var maxConcurrentDownloads: Int { get set }
  • 当前下载的并发数(已入队列的任务数)

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSUInteger currentQueueCount;

    Swift

    var currentQueueCount: UInt { get }
  • 当前下载的并发执行数(正在下载的任务数)

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSUInteger currentDownloadCount;

    Swift

    var currentDownloadCount: UInt { get }

[ 方法 ]

  • 获取单例

    Declaration

    Objective-C

    + (nonnull instancetype)shareManager;

    Swift

    class func share() -> Self

任务控制

下载控制