Class
ADPhotoKitConfiguration
public class ADPhotoKitConfiguration
Class to modify ADPhotoKit's configuration.
Relationships
Nested Types
ADPhotoKitConfiguration.ThumbnailControllerLayout
Layout to control thumbnail controller collection appearance.
Properties
`default`
public static var `default`
Represents a shared configuration used across ADPhotoKit. Use this instance for modify configuration.
locale
public var locale: Locale?
Set framework language, if set nil, framework will use system language. Default is nil.
customLocaleValue
public var customLocaleValue: [Locale:[ADLocale.LocaleKey: String]]?
You can custom display text for diffent language on yourself. Default is nil.
customAlbumOrders
public var customAlbumOrders: [ADAlbumType]?
Custom album orders, if type not contain, it will not display. Default is ordered by ADAlbumType.allCases
's order.
customAlert
public var customAlert: ADAlertConfigurable.Type?
Custom alert. Default to use alert in framework.
customCoreUIBundle
public var customCoreUIBundle: Bundle?
You can custom core
image Bundle by this property or simple replace image in ADPhotoKitCoreUI.bundle
. Default is ADPhotoKitCoreUI.bundle
.
statusBarStyle
public var statusBarStyle: UIStatusBarStyle?
Set status bar style, Default is .lightContent.
customProgressHUDBlock
public var customProgressHUDBlock: (() -> ADProgressHUDable)?
Bolck to generate ProgressHUD
. Default to use hud in framework.
customProgressBlock
public var customProgressBlock: (() -> ADProgressableable)?
Bolck to generate ProgressView
. Default to use view in framework.
fetchTimeout
public var fetchTimeout: TimeInterval = 20
Timeout for request images from select assets. Defaults is 20.
customAlbumListControllerBlock
public var customAlbumListControllerBlock: ((ADAlbumListController) -> Void)?
Block to config ADAlbumListController
.
customAlbumListCellRegistor
public var customAlbumListCellRegistor: ((UITableView) -> Void)?
Bolck to regist cells used in albumlist controller.
customAlbumListCellBlock
public var customAlbumListCellBlock: ((UITableView, IndexPath) -> ADAlbumListCellable)?
Bolck to return custom album list cell.
autoScrollMaxSpeed
public var autoScrollMaxSpeed: CGFloat = 600
The max speed (pt/s) of auto scroll. Defaults to 600.
customThumbnailControllerBlock
public var customThumbnailControllerBlock: ((ADThumbnailViewController) -> Void)?
Block to config ADThumbnailViewController
.
customThumbnailToolBarBlock
public var customThumbnailToolBarBlock: ((ADPhotoKitConfig) -> ADThumbnailToolBarable)?
Bolck to generate ThumbnailToolBar
. Default to use ADThumbnailToolBarView
.
The parameter ADPhotoKitConfig
is the config pass through.
customThumbnailCellRegistor
public var customThumbnailCellRegistor: ((UICollectionView) -> Void)?
Bolck to regist cells used in thumbnail controller.
customThumbnailCellBlock
public var customThumbnailCellBlock: ((UICollectionView, IndexPath) -> ADThumbnailCellable)?
Bolck to return custom thumbnail collection cell.
browseItemSpacing
public var browseItemSpacing: CGFloat = 40
Space between browser controller item.
customBrowserControllerBlock
public var customBrowserControllerBlock: ((ADAssetBrowserController) -> Void)?
Block to config ADAssetBrowserController
.
customBrowserToolBarBlock
public var customBrowserToolBarBlock: ((ADAssetBrowserDataSource) -> ADBrowserToolBarable)?
Bolck to generate BrowserToolBar
. Default to use ADBrowserToolBarView
.
The parameter ADAssetBrowserDataSource
is the datasource of browser controller.
customBrowserCellRegistor
public var customBrowserCellRegistor: ((UICollectionView) -> Void)?
Bolck to regist cells used in browser controller.
customBrowserCellBlock
public var customBrowserCellBlock: ((UICollectionView, IndexPath, ADAsset) -> ADBrowserCellable)?
Bolck to return custom browser collection cell.
The parameter ADAsset
is the asset to browser.
customImageEditBundle
public var customImageEditBundle: Bundle?
You can custom image edit
image Bundle by this property or simple replace image in ADPhotoKitImageEdit.bundle
. Default is ADPhotoKitImageEdit.bundle
.
systemImageEditTools
public var systemImageEditTools: ADImageEditTools = .all
System image edit tools. Default is ordered by ADImageEditTools.all
's order. You can remove some tools or reorder.
customImageEditToolsBlock
public var customImageEditToolsBlock: ((UIImage) -> [ADImageEditTool])?
User custom image edit tools. Custom tools is default add after system tools.
Parameters
Name | Type | Description |
---|---|---|
image | Original image. |
lineDrawColors
public var lineDrawColors: [UIColor] = [.white, .black, UIColor(hex: 0xF14F4F)!, UIColor(hex: 0xF3AA4E)!, UIColor(hex: 0x10C060)!, UIColor(hex: 0x1EB7F3)!, UIColor(hex: 0x8B69EA)!]
System line draw tool selectable colors.
lineDrawDefaultColorIndex
public var lineDrawDefaultColorIndex: Int = 2
System line draw tool default color index.
mosaicDrawWidth
public var mosaicDrawWidth: CGFloat = 25
System mosaic draw tool default line width.
imageStickerDataSource
public var imageStickerDataSource: ADImageStickerDataSource?
System image picker data source.
customImageStickerSelectVC
public var customImageStickerSelectVC: ADImageStickerSelectable?
Custom image sticker select controller.
customTextStickerEditVCBlock
public var customTextStickerEditVCBlock: ((ADTextSticker?) -> ADTextStickerEditable)?
Custom text sticker edit controller.
textStickerColors
public var textStickerColors: [ADTextStickerColor] = [(.white,.black),(.black,.white),(UIColor(hex: 0xF14F4F)!,.white),(UIColor(hex: 0xF3AA4E)!,.white),(UIColor(hex: 0x10C060)!,.white),(UIColor(hex: 0x1EB7F3)!,.white),(UIColor(hex: 0x8B69EA)!,.white)]
System text sticker selectable colors.
textStickerDefaultColorIndex
public var textStickerDefaultColorIndex: Int = 0
System text sticker tool default color index.
customImageClipVCBlock
public var customImageClipVCBlock: ((ADClipInfo) -> ADImageClipable)?
Custom image clip controller.