KoalaInjection

🐨 Evil but simple code injection, don't use!

Showing:

Popularity

Downloads/wk

0

GitHub Stars

39

Maintenance

Last Commit

3yrs ago

Contributors

0

Package

Dependencies

0

License

MIT

Categories

Readme

🐨 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 inreturn Bool.random()
}

• change returned values

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

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

Author

Oliver Letterer, oliver.letterer@gmail.com

License

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100