【发布时间】:2013-12-31 12:05:46
【问题描述】:
我有一个应用程序,它只需启动带有链接的浏览器并自行关闭。 代码如下:
#import "ViewController.h"
@implementation ViewController
-(void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor= [UIColor cyanColor];
mLinkview = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
[mLinkview setDelegate:self];
NSURL *url = [NSURL URLWithString:@"http://www.mediklean.com"];
[[UIApplication sharedApplication] openURL:url];
exit(0);
[self.view addSubview:mLinkview];
// Do any additional setup after loading the view, typically from a nib.
}
-(void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
问题是,启动浏览器之前需要很长时间,例如10 seconds。如果这是由代码或其他原因引起的问题,任何人都可以提供帮助吗?
【问题讨论】: