0
我写下面的代码打开浏览器时,应用程序将去后台打开浏览器:iOS版 - 睡前背景
- (void)applicationWillResignActive:(UIApplication *)application
{
/*
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
*/
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.google.com"]];
}
,但其不开放。有什么建议么?
我可以在“applicationWillResignActive”中打开浏览器吗?
我同意你的意见。我刚刚得到了这个要求...... – Satyam
然后,作为开发人员的工作是推回给你的老板/客户,这是一个不好的要求(尽管说起来容易做起来难)。我只是告诉他们,苹果公司不会让你这样做:) – deanWombourne
..或更好的是,操作系统不会让你。 – TigerCoding