English 中文(简体)
电话二等电线器,IDWebview local htm文档不会装上。 我已尝试过无数方法,但都没有奏效。
原标题:Iphone secondary xib, UIWebview local htm file will not load. I have tried numerous methods nothing has worked

我正在用自己的轴心进行次要观察。 我可以把它装上罚款,但无法在网上查阅任何内容。 我有另一个情况是,这种优惠在发挥作用,但主要看法是。

这里是我使用的法典。

@synthesize webView;

- (void)viewDidLoad
{
    NSString *path = [[NSBundle mainBundle] pathForResource:@"workshop" ofType:@"htm" inDirectory:@"dirA"];
    NSFileHandle *readHandle = [NSFileHandle fileHandleForReadingAtPath:path];

    NSString *htmlString = [[NSString alloc] initWithData: 
       [readHandle readDataToEndOfFile] encoding:NSUTF8StringEncoding];

// to make html content transparent to its parent view -
// 1) set the webview s backgroundColor property to [UIColor clearColor]
// 2) use the content in the html: <body style="background-color: transparent">
// 3) opaque property set to NO
//
webView.opaque = NO;
webView.backgroundColor = [UIColor clearColor];
[self.webView loadHTMLString:htmlString baseURL:nil];
[htmlString release];
}

- (void)dealloc
{   
    [webView release];
    [super dealloc];
}





-(IBAction)switchCanary {

 [self dismissModalViewControllerAnimated:YES];
}

-(IBAction)switchBack {

 [self dismissModalViewControllerAnimated:YES];
}
@end
最佳回答

我是这样说的。 出于某种原因,我得以将档案装上了上。 我不得不将其全部改为.html,现在,它已经运作。 也许会发生最近的变化。 另一项数据是两部SDK版本。

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签