File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 11# coding: utf-8
2- import objc
3- reload ( objc )
4- from objc import *
2+
3+
4+ from objc_util import *
55import ui ,console
66
77
@@ -12,19 +12,18 @@ def get_toolbar(view):
1212 #get main editor toolbar, by recursively walking the view
1313 sv = view .subviews ()
1414
15- for i in range (sv .count ()- 1 ):
16- v = sv .objectAtIndex_ (ns (i ))
15+ for v in sv :
1716 if v ._get_objc_classname ()== 'OMTabViewToolbar' :
1817 return v
1918 tb = get_toolbar (v )
2019 if tb :
21- return tb
20+ return tb
2221
2322tb = get_toolbar (main_view )
2423execbtn = ui .Button (frame = (tb .size ().width - tb .rightItemsWidth ()- 40 ,22 ,40 ,40 ))
2524execbtn .flex = 'R'
2625execbtn .image = ui .Image .named ('iow:ios7_play_32' )
27- execbtn_obj = ObjCInstance (execbtn . _objc_ptr )
26+ execbtn_obj = ObjCInstance (execbtn )
2827tb .addSubview_ (execbtn_obj )
2928
3029def run_script (sender ):
You can’t perform that action at this time.
0 commit comments