Extensions

The following extensions are available globally.

Concurrency+Plugin

Notification+Exception

KVO

UIWindow+Navigation

UIViewController+Navigation

UINavigationController+Navigation

WrapperCompatible

NavigationController

  • Declaration

    Swift

    @_spi(FW) extension UINavigationBar
  • present带导航栏webview,如果存在input[type=file],会dismiss两次,无法选择照片。 解决方法:1.使用push 2.重写dismiss方法仅当presentedViewController存在时才调用dismiss

    See more

    Declaration

    Swift

    @_spi(FW) extension UIToolbar

UIView+ViewTransition

Codable+Extension

EnumType

Serializer

BadgeView

CollectionViewDelegate

DrawerView

  • 滚动视图纵向手势冲突无缝滑动分类,需允许同时识别多个手势

    See more

    Declaration

    Swift

    @_spi(FW) extension UIScrollView

UIKit+SkeletonView

UITextField+TextFieldDelegate

UISearchBar+SearchBarDelegate

WKWebView+WebView

UIProgressView+WebView

UIView+AlertPlugin

  • 系统弹出动作title仅支持NSString,如果需要支持NSAttributedString等,请使用AlertController

    See more

    Declaration

    Swift

    @_spi(FW) extension UIAlertAction
  • 系统弹出框title和message仅支持NSString,如果需要支持NSAttributedString等,请使用AlertController

    See more

    Declaration

    Swift

    @_spi(FW) extension UIAlertController

UIView+ImagePlugin

UIViewController+ImagePickerPlugin

UIView+ViewPlugin

Bundle+Language

UIColor+Theme

UIImageAsset+Theme

AnyValidator

AnyEncoder

Encodable+AnyEncoder

Encoder+AnyEncoder

AnyDecoder

Decodable+AnyDecoder

Decoder+AnyDecoder

AnyDateFormatter

AnyCodable

AnyParameter+Extension

UIApplication+Adaptive

UIDevice+Adaptive

UIScreen+Adaptive

UILayoutPriority+AutoLayout

NSLayoutConstraint+AutoLayout

UITabBar+BarAppearance

  • 标签栏视图分类,全局设置用[UITabBar appearance]。iOS15+启用appearance,iOS14及以下使用旧版本api 注意:需要支持appearance的属性必须标记为objc,否则不会生效

    See more

    Declaration

    Swift

    @_spi(FW) extension UITabBar

DispatchQueue+Block

Timer+Block

UIGestureRecognizer+Block

UIControl+Block

FileManager+Foundation

UserDefaults+Foundation

CADisplayLink+QuartzCore

  • 如果block参数不会被持有并后续执行,可声明为NS_NOESCAPE,不会触发循环引用

    See more

    Declaration

    Swift

    @_spi(FW) extension CADisplayLink

CAAnimation+QuartzCore

CALayer+QuartzCore

Adaptive+Shortcut

UIFont+Toolkit

UIBezierPath+UIKit

UIPanGestureRecognizer+UIKit

UIPageControl+UIKit

UISlider+UIKit

UISwitch+UIKit

Introspect

List

Divider+Toolkit

  • 修改分割线颜色使用background方法即可,示例:background(Color.gray)

    See more

    Declaration

    Swift

    extension Divider

Rectangle+Toolkit

AFError+AlamofireImpl

MultipartFormData+AlamofireImpl