public static int CGRectIsEmpty(CGRect rect) { return ((rect.size.width > 0) && (rect.size.height > 0)) ? 0 : 1; }