Latest 0.2.2
Homepage https://github.com/monkeyspot/koala-injection
License MIT
Platforms ios 10.0
Authors

🐨 KoalaInjection

Evil but simple code injection, don’t use!

Example

let view = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 50.0, height: 50.0))
view.backgroundColor = UIColor.red

view.koala🐨.layoutSubviews { ✅ // inject code after original implementation
    $0.backgroundColor = UIColor.blue
}

Advanced

• extract arguments

let viewController = UIViewController()

viewController.koala🐨.setTitle { ✅
    let title = $1.arguments()[0] as NSString
}

• change arguments

let viewController = UIViewController()

viewController.koala🐨.before.viewWillDisappear { ✅
    $1.arguments()[0] = true
}

• return values

let viewController = UIViewController()

viewController.koala🐨.prefersStatusBarHidden { () -> Bool in ✅
    return Bool.random()
}

• change returned values

let viewController = UIViewController()
viewController.title = "Hello"

viewController.koala🐨.title { (_, _, result) -> NSString? in ✅
    return result?.appending(" world") as NSString?
}

Author

Oliver Letterer, [email protected]

License

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

Latest podspec

{
    "name": "KoalaInjection",
    "version": "0.2.2",
    "summary": "Evil but simple code injection, don't use!",
    "description": "Evil but simple code injection, don't use!",
    "homepage": "https://github.com/monkeyspot/koala-injection",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Oliver Letterer": "[email protected]"
    },
    "source": {
        "git": "https://github.com/monkeyspot/koala-injection.git",
        "tag": "0.2.2"
    },
    "social_media_url": "https://twitter.com/OliverLetterer",
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "koala-injection/*"
}

Pin It on Pinterest

Share This