Skip to content

Instantly share code, notes, and snippets.

View blmacbeth's full-sized avatar
💭
I may be slow to respond.

blmacbeth

💭
I may be slow to respond.
View GitHub Profile
@blmacbeth
blmacbeth / device_info.py
Created September 19, 2015 22:23
device_info.py
# coding: utf-8
__doc__ = \
'''Provides an easy way of determining if you are on an iPad or an iPhone'''
from objc_util import *
from ui import get_screen_size
UIDevice = ObjCClass('UIDevice')
@blmacbeth
blmacbeth / ProgressView.py
Created September 19, 2015 20:08
ProgressView.py
# coding: utf-8
from objc_util import *
## this is bad python styling, but I justify it by saying the
## function is an alias for the UIColor class
def UIColor(red=1.0, green=1.0, blue=1.0, alpha=1.0):
UIColor = ObjCClass('UIColor')
r = CGFloat(red)
g = CGFloat(green)