Skip to content

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

License

Notifications You must be signed in to change notification settings

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, [email protected]

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