[英]In UIWebView, DIV is scrolling differently in iOS 4.3 and 5.0
[英]UIWebView shouldStartLoadWithRequest not called in iOS 4.3
UIWebView的shouldStartLoadWithRequest由javascript使用
window.location = updateappdata://type/viewName/;
並在ios 5.0、5.1、6.0中完美運行
但是在ios 4.3中,僅調用了某些updateappdata://回調,而並非所有的shouldStartLoadWithRequest都被調用。 任何想法有什么問題嗎?
問題在於通過子視圖將uiwebviews滾動視圖的委托設置為viewcontroller。
if ([[subview class] isSubclassOfClass: [UIScrollView class]])
{
[((UIScrollView *)subview) setDelegate: self];
}
由於在iOS 5.0及更高版本中具有.scrollView屬性,因此在那里一切正常。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.