Latest 0.2.0
Homepage https://github.com/monkeyspot/stormborn
License MIT
Platforms ios 10.0
Authors

🌪 stormborn

Lazy method swizzling, limited to 20 arguments.

Example

without arguments

UIView.swizzle🌪.layoutSubviews { (object, sup) -> in
    sup.invoke()
}

with arguments

UIViewController.swizzle🌪.viewDidAppear { (object, animated: Bool, sup) -> in
    sup.invoke(animated)
}

multiple arguments and return types

class Greeter: NSObject {
    @objc dynamic func greet(first: String, last: String) -> String {
        return "Hello (first) (last)"
    }
}

Greeter.swizzle🌪.greetWithFirstlast { (object, arguments: (first: NSString, last: NSString), sup) -> NSString in
    return sup.invoke(arguments.first, arguments.last)
}

Author

Oliver Letterer, [email protected]

License

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

Latest podspec

{
    "name": "stormborn",
    "version": "0.2.0",
    "summary": "Lazy method swizzling, limited to 20 arguments.",
    "description": "Lazy method swizzling, limited to 20 arguments.",
    "homepage": "https://github.com/monkeyspot/stormborn",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Oliver Letterer": "[email protected]"
    },
    "source": {
        "git": "https://github.com/monkeyspot/stormborn.git",
        "tag": "0.2.0"
    },
    "social_media_url": "https://twitter.com/OliverLetterer",
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "stormborn/*"
}

Pin It on Pinterest

Share This