0
Когда я загружаю html на UIWebView
в ios8
, приложение разбивается. Второй раз, когда я открываю страницу снова не врезаться, это происходит только в IOS 8.Ошибка UIWebView на ios 8
На ViewWillAppear
вызывающему OpenLink
-(void)openLink{
NSString *pathFile = [[NSBundle mainBundle] pathForResource:filePath ofType:@"html"];
NSURL *url = [NSURL fileURLWithPath:pathFile ];
NSString *urlwithoutQueryString = [url absoluteString];
NSString * urlWithQueryString = [NSString stringWithFormat:@"%@?%@",urlwithoutQueryString, filePathAnchor];
NSURL *url2 = [NSURL URLWithString:urlWithQueryString];
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:url2];
if ([webView request] != urlRequest){
[webView loadRequest:urlRequest];
}
NSString *str =[NSString stringWithFormat:@"javascript:gotoInternalHref('0000');"];
[webView stringByEvaluatingJavaScriptFromString:str];
}
Javascript Функция
function gotoInternalHref(posIndex) {
LocationHash = "#" + posIndex;
positionindex = posIndex;
window.location.hash = LocationHash;
}
Пожалуйста помогите мне решить эту проблему.
Заранее спасибо.
Попробуйте отладить его с включенными NSZombies – muffe
@ muffe2k Включено .. –