NSURL *url = [NSURL URLWithString:@"valid_webcal_url"];
if (![[UIApplication sharedApplication] openURL:url])
{
// failure callback
NSLog(@"%@%@",@"Failed to open url:",[url description]);
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:LCHLocalizedString(@"SUBSCRIBE_ERROR", nil) message:nil delegate:self cancelButtonTitle:@"Okay" otherButtonTitles: nil];
[alert show];
}
所以我已经弄清楚如何查看加载 webcal 是否出错,但是我怎么知道 webcal 何时加载成功?当点击“订阅”按钮时,我会显示一个加载器,只需要知道何时将其关闭。