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 | |
__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') |
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 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) |