Created
June 10, 2016 18:32
-
-
Save lukaskollmer/25444f7ab36c638e1ec5142ee894e357 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UITapGestureRecognizer = ObjCClass('UITapGestureRecognizer') | |
| def action(_self, _cmd, sender): | |
| tag = ObjCInstance(sender).view().tag() | |
| asset = images[tag] | |
| asset.get_image() | |
| action.encoding = '@0@0:0@0' | |
| @on_main_thread | |
| def setup_objc_stuff(): | |
| global GestureRecognizerHandler | |
| GestureRecognizerHandler = create_objc_class('GestureRecognizerHandler', NSObject, methods=[action]) | |
| setup_objc_stuff() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment