我正在开发示例应用程序,其中我是UIApplication的子类,并且覆盖sendEvent function.Everything工作良好,但是有时我在函数中遇到异常,是不是[UIApplication SendEvent]可能通过exception??..following是我的代码。
(void)sendEvent:(UIEvent *)event
{
[super sendEvent:event];
//Some other things just checking for type of event..etc...
} 在调用[super sendEvent:event];之后,我得到了崩溃信号。
发布于 2015-08-24 01:58:50
我认为你应该在你的例行公事结束时移动[super sendEvent:event]。
如果你要截取,你应该最后而不是第一个调用超类方法。如果您首先调用超级方法,它会将事件传递给所有最终可能会吃掉它的响应器。
https://stackoverflow.com/questions/28876667
复制相似问题