@implementation SecondViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
webView.userInteractionEnabled = TRUE;
[webView loadRequest: [[NSURLRequest alloc] initWithURL: [[NSURL alloc] initWithString: [[[@"http//:www.mobile-boome.weebly.com/boome-webviwer.html" ]]];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
问题在第8行:xcode表示预期的标识符,但我无法理解问题是什么,所以我无法解决它! 感谢
答案 0 :(得分:1)
你在这一行有额外的括号。此外,NSURLRequest和NSURL都有类方法,可以简化构造类的实例。
试试这个:
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http//:www.mobile-boome.weebly.com/boome-webviwer.html"]]];