【发布时间】:2012-09-06 13:25:13
【问题描述】:
我正在尝试从我的项目中的支持文件夹中加载本地 HTML 文件...我不断收到此消息...线程 1:断点 1.1,我不知道为什么,我的网络代码视图如下
#import "WPViewController.h"
@interface UIViewController ()
@end
@implementation WPViewController
@synthesize viewWeb;
- (void)viewDidLoad {
[super viewDidLoad];
NSString *path = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"localHTML"];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[viewWeb loadRequest:request];
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
}
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
- (IBAction)dismissView:(id)sender {
[self dismissModalViewControllerAnimated:YES];
}
@end
标题...
#import <UIKit/UIKit.h>
@interface WPViewController : UIViewController
@property (strong, nonatomic) IBOutlet UIWebView *viewWeb;
- (IBAction)dismissView:(id)sender;
@end
【问题讨论】:
标签: iphone html ios xcode uiwebview