Skip to content

Instantly share code, notes, and snippets.

@jsbain
Created November 11, 2017 05:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jsbain/0c97625cc4b32012b4a513d72c8850ea to your computer and use it in GitHub Desktop.
Save jsbain/0c97625cc4b32012b4a513d72c8850ea to your computer and use it in GitHub Desktop.
Untitled_167.py
from objc_util import *
import ui
NSBundle.bundleWithPath_('/System/Library/Frameworks/CoreAudioKit.framework').load()
app=UIApplication.sharedApplication()
CABTMIDICentralViewController=ObjCClass('CABTMIDICentralViewController')
vc=CABTMIDICentralViewController.new()
root=ui.View(frame=(0,0,200,320))
v1=ui.View(frame=(0,0,200,320),bgcolor='blue',name='a')
nav=ui.NavigationView(v1,frame=(0,0,200,320))
root.add_subview(nav)
nc=ObjCInstance(nav).navigationController()
root.present('sheet')
@on_main_thread
def run():
nc.pushViewController_animated_(vc,False)
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment