我想检查我的WebView是否在本地加载特定的HTML页面(例如index2.html)。那可能吗?谢谢!!如何检查WebView是否正在加载特定页面?
编辑:
我已经使用这个代码:
NSString *currentURL
= webview1.request.URL.absoluteString;
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"indexPRO" ofType:@"html"];
urlLocation1 = [NSURL fileURLWithPath:filePath];
if(currentURL = urlLocation1){ //Do something..
但不工作....是因为我使用CURRENTURL“绝对串”和相对字符串“urlLocation1”?