是子类化UIWebView皱眉吗? [英] Is subclassing UIWebView frowned upon?

查看:119
本文介绍了是子类化UIWebView皱眉吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说过关于是否允许创建UIWebView的子类的不同的事情。 developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950-CH3-DontLinkElementID_2\">将 UIWebView 引用,它说的是:


子类注释



UIWebView类不应该被子类化。


它不说为什么。我猜这是为了维护底层WebKit控件的完整性或其他东西,我dunno。


I've heard varying things about whether or not creating a Subclass of UIWebView is allowable. Can someone link me to any documentation that clarifies this one way or another?

解决方案

Under Subclassing Notes of the UIWebView reference, all it says is:

Subclassing Notes

The UIWebView class should not be subclassed.

It doesn't say why. I would guess that it's to maintain the integrity of the underlying WebKit control or something, I dunno.

这篇关于是子类化UIWebView皱眉吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆