Permalink
Browse files

added function for checking if multitasking supported

  • Loading branch information...
1 parent f7d4041 commit dfb1634ffb1d86feed8841dc5f4808b5bf1c832d samyzee committed Oct 24, 2011
Showing with 14 additions and 0 deletions.
  1. +5 −0 src/Three20UICommon/Headers/TTGlobalUICommon.h
  2. +9 −0 src/Three20UICommon/Sources/TTGlobalUICommon.m
@@ -37,6 +37,11 @@ BOOL TTIsKeyboardVisible();
*/
BOOL TTIsPhoneSupported();
+/**
+ * @return TRUE if the device supports backgrounding
+ */
+BOOL TTIsMultiTaskingSupported();
+
/**
* @return TRUE if the device is iPad.
*/
@@ -106,6 +106,15 @@ BOOL TTIsPhoneSupported() {
return [deviceType isEqualToString:@"iPhone"];
}
+///////////////////////////////////////////////////////////////////////////////////////////////////
+BOOL TTIsMultiTaskingSupported() {
+ UIDevice* device = [UIDevice currentDevice];
+ BOOL backgroundSupported = NO;
+ if ([device respondsToSelector:@selector(isMultitaskingSupported)]){
+ backgroundSupported = device.multitaskingSupported;
+ }
+ return backgroundSupported;
+}
///////////////////////////////////////////////////////////////////////////////////////////////////
BOOL TTIsPad() {

0 comments on commit dfb1634

Please sign in to comment.