Last active
May 30, 2016 15:41
-
-
Save alessaba/8877278f1d7581a6fd2a0115137d289a to your computer and use it in GitHub Desktop.
This file contains 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
# coding: utf-8 | |
from objutil import * | |
import ui | |
colorpicker = ObjCClass('OMColorPickerViewController').new().autorelease() | |
clview = colorpicker.view() | |
clview.frame = CGRect((0, 0), (512, 512)) | |
view = presentUIView(clview, 'Color Picker', 'sheet') | |
def savecolor(sender): | |
cl = colorpicker.color() | |
print cl.hexStringFromColor() | |
bbi = ui.ButtonItem('Color Code', action=savecolor) | |
view.right_button_items = [bbi] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment