-1

このエラーがあります:

「'NSBundle の目に見える @interface はセレクタ'pathforresource: のタイプを宣言しません」 .

#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
4

1 に答える 1