我正在尝试打开应用程序“计算器”,但我不知道方案
- (IBAction)btnColetorClick:(id)sender
{
NSString *customURL = @"calculator://";
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:customURL]])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:customURL]];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"URL error"
message:[NSString stringWithFormat:@"No custom URL defined for %@", customURL]
delegate:self
cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alert show];
}
}发布于 2016-03-08 02:52:09
发布于 2020-02-17 19:46:26
你可以试试"calc://"
它可以在iOS13上运行
https://stackoverflow.com/questions/35850782
复制相似问题