Skip to content

Instantly share code, notes, and snippets.

@ktakayama
Created January 30, 2011 19:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ktakayama/803135 to your computer and use it in GitHub Desktop.
Save ktakayama/803135 to your computer and use it in GitHub Desktop.
+ (BOOL) hasExt:(NSString *)ext {
NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"check.%@", ext]];
UIDocumentInteractionController *doc =
[UIDocumentInteractionController interactionControllerWithURL:url];
BOOL success = [doc presentOptionsMenuFromRect:CGRectZero inView:[UIApplication sharedApplication].keyWindow animated:NO];
if(success) [doc dismissMenuAnimated:NO];
return success;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment