我有这个错误:
“'NSBundle 没有可见的@interface 声明选择器'pathforresource: of type”。
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
@synthesize WebView1;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSString *localFilePath = [[NSBundle mainBundle] pathForResoursce:@"www/index" ofType:@"html"] ;
NSURLRequest *localRequest = [NSURLRequest requestWithURL:
[NSURL fileURLWithPath:localFilePath]] ;
[WebView1 loadRequest:localRequest] ;
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
#import <UIKit/UIKit.h>
#import "ViewController.h"
@interface ViewController : UIViewController
@property (nonatomic,retain) IBOutlet UIWebView *WebView1;
@end