2
在蘋果的文檔,事件處理指南適用於iOS,部分 「Best Practices for Handling Multitouch Events」:爲什麼Apple的文檔說你不要在UIView的子類中調用超類的事件處理方法?
If you handle events in a subclass of UIView, UIViewController, or (in rare cases) UIResponder,
You should implement all of the event-handling methods (even if it is a null implementation).
Do not call the superclass implementation of the methods.
和
If you handle events in a subclass of any other UIKit responder class,
You do not have to implement all of the event-handling methods.
But in the methods you do implement, be sure to call the superclass implementation.
爲什麼?我不明白這兩種情況的第二點背後的理由。這不取決於不同的情況嗎?
我添加了另一個案例(任何其他UIKit響應者類的子類)。你的解釋是否也適用於附加案例? – yehnan 2010-08-21 05:48:04