Skip to content

yanmingLiu/YMExtension

Repository files navigation

YMExtension

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

YMExtension is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'YMExtension'
public struct ExtWrapper<Base> {
    public let base: Base
    init(_ base: Base) {
        self.base = base
    }
}

public protocol ExtCompatible: Any { }

public extension ExtCompatible {
    static var ext: ExtWrapper<Self>.Type {
        get{ ExtWrapper<Self>.self }
        set {}
    }
    
    var ext: ExtWrapper<Self> {
        get { return ExtWrapper<Self>(self) }
        set { }
    }
}

Author

lym, lwb374402328@gmail.com

License

YMExtension is available under the MIT license. See the LICENSE file for more info.

About

swift 常用扩展,pod支持。pod 'YMExtension'

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published