Enums
The following enums are available globally.
-
There are two sort mode: manual mode(.manual) and predefined mode(the follow latter four types). Task order in
downloadListofSDEDownloadManageris determined bysortTypeandsortOrdertogether.case
manual: You determine task location.case
addTime: Sorted by time when task is added.case
fileName: Sorted by file display name.case
fileSize: Sorted by file size.case
See morefileType: Sorted and grouped by file type.Declaration
Swift
@objc public enum ComparisonType: Int -
Task order in the list.
case
ascending: A -> Z; Old -> New; Small -> Big.case
See moredescending: Z -> A; New -> Old; Big -> Small.Declaration
Swift
@objc public enum ComparisonOrder: Int -
The state of download task in
SDEDownloadManager.case
notInList: The URL which you query is not in the download manager. I set this value to make the framework be compatible with Objective-C. BecauseInt?can’t be presented in Objective-C.case
pending: Not downloading and it’s sure that task has no resume data.case
downloading: Downloading.case
paused: Download is paused.case
stopped: Not downloading and it’s sure that task has resume data to continue download.case
See morefinished: File is downloaded successfully.Declaration
Swift
@objc public enum DownloadState: Int -
Select the content to display in
DownloadListController.case
downloadList: All tasks indownloadList, not include tasks in the trash(toDeleteList).case
unfinishedList: All unfinished tasks, not include tasks in trash. Sorted by add time.case
toDeleteList: Tasks in the trash. Sorted by delete time.case
See moresubsection:downloadListis a two-dimensional String array, select this case to display specified part. PropertysubsectionIndexdetermines which part.Declaration
Swift
@objc public enum ListContent: Int -
Select how to detele a task in
DownloadListController.case
fileAndRecord: Delete task record and relative file both. If SDEDownloadManager’sisTrashOpened == true, task is moved to the trash.case
onlyFile: Only delete relative file, and keep task record.case
See moreoptional: Offer options: only file or both.Declaration
Swift
@objc public enum DeleteMode: Int -
Appearance style of imageView in UITableViewCell in
DownloadListController.case
thumbnail: Show a thumbnail image at the location of cell’s imageView.case
index: Show index(begin from 1) at the location of cell’s imageView.case
See morenone: Hidden cell’s imageView.Declaration
Swift
@objc public enum CellImageViewStyle: Int -
Thumbnail shape of imageView in UITableViewCell in
DownloadListController.case
original: Displayed thumbnail has same width/height ratio with original image.case
See moresquare: Displayed thumbnail’s width/height ratio is 1:1. Sometimes thumbnail is smaller than requested, it’s still displayed in original scale.Declaration
Swift
@objc public enum ThumbnailShape: Int -
Appearance style of accessoryView(a button) of
DownloadTrackerCellinDownloadListController. If you want your custom UITableViewCell is compatible with this enum type, look propertycellAccessoryButtonStyleofDownloadListController.case
icon: Accessory button in the cell shows a predefined icon which bind to task state.case
title: Accessory button in the cell shows a predefined title which bind to task state.case
none: Hidden accessory button in the cell.case
See morecustom: Accessory button has no title or image to be visible and touching won’t happen anything in this style. You could configure button inDownloadListControllerinit method, and its closureaccessoryButtonTouchHandler. It’s up to you.Declaration
Swift
@objc public enum AccessoryButtonStyle: Int -
Appearance style of predefined UIBarButtonItem which are used in property
toolBarActionsandleftNavigationItemActionsinDownloadListController.case
icon: BarButtonItem shows an icon.case
See moretitle: BarButtonItem shows a title.Declaration
Swift
@objc public enum BarButtonAppearanceStyle: Int -
Predefined action for UIBarButtonItem in toolBar of
DownloadListControllerbytoolBarActions. For example,toolBarActions = [.resumeAll, .stopAll], toolBar will show two UIBarButtonItem to provide these two features.case
resumeAll: Resume all unfinished tasks. It won’t be displayed ifdisplayContent == .toDeleteList.case
pauseAll: Pause all downloading tasks. It won’t be displayed ifdisplayContent == .toDeleteList.case
stopAll: Stop all downloading tasks and cancel all waitting tasks. It won’t be displayed ifdisplayContent == .toDeleteList.case
See moredeleteAll: Delete all tasks. It won’t be displayed ifdisplayContent == .unfinishedList.Declaration
Swift
@objc public enum ToolBarAction: Int -
Predefined action for UIBarButtonItem in
leftBarButtonItemsof navigationItem ofDownloadListControllerin multiple selection mode, and relative property:leftNavigationItemActions. For example,leftNavigationItemActions = [.selectAll, .pauseSelected], in DownloadListController’s multiple selection mode, left navigationItem will show two UIBarButtonItem to provide these two features.case
selectAll: Select/Unselect all tasks(all cells).case
resumeSelected: Resume resumeable tasks in selected tasks(selected cells). It won’t be displayed ifdisplayContent == .toDeleteList.case
pauseSelected: Pause downloading tasks in selected tasks(selected cells). It won’t be displayed ifdisplayContent == .toDeleteList.case
stopSelected: Stop downloading tasks and cancel waitting tasks in selected tasks(selected cells). It won’t be displayed ifdisplayContent == .toDeleteList, neither ifallowsStop == false.case
deleteSelected: Delete selected tasks(selected cells). It won’t be displayed ifdisplayContent == .unfinishedList, orallowsDelete == falsein other lists(except for.toDeleteList).case
See morerestoreSelected: Restore selected deleted tasks back to download list. It is avaiable only ifdisplayContent == .toDeleteList.Declaration
Swift
@objc public enum NavigationBarAction: Int
View on GitHub
Install in Dash
Enums Reference