0
我試圖從UIAlertView在appstore中打開一個應用程序,當otherButtonTitle。問題沒有發生。通過itms-apps打開appstore
我檢查了其他按鈕時按下,如果此方法被調用,它是。我猜測問題在於openURL。 appId包含沒有任何whiteSpace的應用的名稱,如「youtube」。鏈接怎麼沒有打開?我試過在尋找其他線程,這是一個應該在AppStore的
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex: (NSInteger)buttonIndex
{
if (buttonIndex == 1)
{
NSString *appId = [[otherArray objectAtIndex:currentRow] objectForKey:@"link"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat: @"itms-apps://itunes.apple.com/app/%@?mt=8", appId]]];
}
}
選中此鏈接(https://developer.apple.com/library/ios/qa/qa1633/_index.html) – Pawan