Skip to content

Instantly share code, notes, and snippets.

@lukaskollmer
Created June 19, 2016 19:12
Show Gist options
  • Select an option

  • Save lukaskollmer/26cdacbc2a29188b24d170a3a18f4d3c to your computer and use it in GitHub Desktop.

Select an option

Save lukaskollmer/26cdacbc2a29188b24d170a3a18f4d3c to your computer and use it in GitHub Desktop.
pinkonista
from objc_util import *
UIColor = ObjCClass('UIColor')
UIViewController = ObjCClass('UIViewController')
@on_main_thread
def main():
color = UIColor.colorWithHexString_('#FFC0CB')
vc = UIViewController.new()
vc.view().setBackgroundColor_(color)
tabVC = UIApplication.sharedApplication().keyWindow().rootViewController()
tabVC.presentViewController_animated_completion_(vc, False, None)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment