-
-
Save zhaozzq/1c360c26eceaacaba6bc16d4cd53151f to your computer and use it in GitHub Desktop.
Generated by Xgist (https://github.com/Bunn/Xgist) at 2017年7月10日 下午2:45:32
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
+ (void)callNumber:(NSString *)number | |
{ | |
NSURL *tel = [NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",number]]; | |
if (OSLeastIOS10) { | |
[[UIApplication sharedApplication] openURL:tel options:@{} completionHandler:nil]; | |
}else{ | |
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wdeprecated-declarations" | |
[[UIApplication sharedApplication] openURL:tel]; | |
#pragma clang diagnostic pop | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment