在《iOS WebCore的wak目录》中证实了iOS的WebKit是想尽可能复用Mac上的代码,所以WebView在iOS和Mac上差不多。
Mac WebView的参考文档:
当然,官方文档不会描述WebView在iOS上的作用,因为用class-dump导出头文件的关系,所以有些成为了私有API的函数还是值得说说,例如设置UA。
+ (BOOL)canShowMIMEType:(NSString *)MIMEType
能否显示某种MIMEType的数据。iOS可以做截获判断。
+ (void)_setTileCacheLayerPoolCapacity:(unsigned int)arg1;
设置块区绘制的layer缓存数量。关于TileCache暂可参考《UIWebView结构体系(二)UIWebTiledView和WAKWindow》,把这个数值设大可在一定程度加速页面渲染,但也会因此占用更多内存。
+ (void)_setHTTPPipeliningEnabled:(BOOL)arg1;
开关 HTTP管线化
+ (void)_removeUserStyleSheetsFromGroup:(id)arg1 world:(id)arg2; + (void)_removeUserScriptsFromGroup:(id)arg1 world:(id)arg2; + (void)_removeUserStyleSheetFromGroup:(id)arg1 world:(id)arg2 url:(id)arg3; + (void)_removeUserScriptFromGroup:(id)arg1 world:(id)arg2 url:(id)arg3; + (void)_addUserStyleSheetToGroup:(id)arg1 world:(id)arg2 source:(id)arg3 url:(id)arg4 whitelist:(id)arg5 blacklist:(id)arg6 injectedFrames:(int)arg7; + (void)_addUserStyleSheetToGroup:(id)arg1 world:(id)arg2 source:(id)arg3 url:(id)arg4 whitelist:(id)arg5 blacklist:(id)arg6; + (void)_addUserScriptToGroup:(id)arg1 world:(id)arg2 source:(id)arg3 url:(id)arg4 whitelist:(id)arg5 blacklist:(id)arg6 injectionTime:(int)arg7 injectedFrames:(int)arg8; + (void)_addUserScriptToGroup:(id)arg1 world:(id)arg2 source:(id)arg3 url:(id)arg4 whitelist:(id)arg5 blacklist:(id)arg6 injectionTime:(int)arg7;
没用过,从名字看是为特定的资源添加StyleSheet和Script
+ (void)_setMaximumImageSizeBeforeSubsampling:(unsigned int)arg1;
设置图片资源预取样的最大size
+ (BOOL)_canHandleRequest:(NSURLRequest*)arg1; + (BOOL)_canHandleRequest:(NSURLRequest*)arg1 forMainFrame:(BOOL)arg2;
能否处理这个Request
+ (void)_disableRemoteInspector; + (void)_enableRemoteInspector;
开关远程调试功能
+ (BOOL)_allowCookies; + (void)_setAllowCookies:(BOOL)arg1;
- (void)_setCookieEnabled:(BOOL)arg1; - (BOOL)_cookieEnabled;
是否启用Cookies
+ (BOOL)_acceleratedImageDecoding; + (void)_setAcceleratedImageDecoding:(BOOL)arg1;
开关加速图片解码
+ (void)_setCacheModel:(unsigned int)arg1;
设置Cache
+ (void)_setPDFViewClass:(Class)arg1; + (Class)_getPDFViewClass; + (void)_setPDFRepresentationClass:(Class)arg1; + (Class)_getPDFRepresentationClass;
设置显示PDF的类
- (double)estimatedProgress;
获取估算的加载进度
- (id)elementAtPoint:(struct CGPoint)arg1; - (id)_elementAtWindowPoint:(struct CGPoint)arg1;
获取在指定坐标的元素
- (id)customUserAgent; - (void)setCustomUserAgent:(id)arg1;
设置自定义的UA
- (void)_setWebGLEnabled:(BOOL)arg1; - (BOOL)_webGLEnabled;
开关WebGL功能
- (void)setUsesPageCache:(BOOL)arg1; - (BOOL)usesPageCache;
开关缓存Page
- (id)_touchEventRegions;
获取在监听touch事件的区域
- (id)_formDelegateForSelector:(SEL)arg1; - (id)_formDelegateForwarder; - (id)_formDelegate; - (void)_setFormDelegate:(id)arg1;
表单处理的委托。可实现自动填充功能
下一篇:UIWebView体系结构(八)各个Client综述
时间: 2024-10-23 12:40:58