Skip to content
Browse files

use class instead

  • Loading branch information...
1 parent 44bc4d9 commit 7fa70fc437f25245b066517ede2e942546638fd1 @gtalusan gtalusan committed Jan 21, 2012
Showing with 6 additions and 8 deletions.
  1. +6 −8 Classes/ShareKit/Sharers/Actions/Print/SHKPrint.m
View
14 Classes/ShareKit/Sharers/Actions/Print/SHKPrint.m
@@ -40,11 +40,10 @@ + (BOOL)requiresAuthentication
+ (BOOL)canShare
{
-#if __IPHONE_OS_VERSION_MIN_REQUIRED < 42000
- return NO;
-#else
+ if (![UIPrintInteractionController class])
+ return NO;
+
return [UIPrintInteractionController isPrintingAvailable];
-#endif
}
- (BOOL)shouldAutoShare
@@ -64,9 +63,9 @@ - (BOOL)send
- (BOOL)print
{
-#if __IPHONE_OS_VERSION_MIN_REQUIRED < 42000
- return NO;
-#else
+ if (![UIPrintInteractionController class])
+ return NO;
+
UIPrintInteractionController *printer = [UIPrintInteractionController sharedPrintController];
UIPrintInfo *info = [UIPrintInfo printInfo];
info.outputType = UIPrintInfoOutputPhoto;
@@ -84,7 +83,6 @@ - (BOOL)print
}
];
return YES;
-#endif
}
@end

0 comments on commit 7fa70fc

Please sign in to comment.
Something went wrong with that request. Please try again.