0
我似乎無法能夠找出爲什麼這個代碼轉發的UIButton觸摸停在iOS5的工作:的UIButton觸摸轉發不工作在iOS5中(僅在iPad上)
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];
[self.nextResponder touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesMoved:touches withEvent:event];
[self.nextResponder touchesMoved:touches withEvent:event];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesEnded:touches withEvent:event];
[self.nextResponder touchesEnded:touches withEvent:event];
}
當我登錄了下一個響應者的觸摸方法,我可以看到,觸動移動只轉發一次,觸摸結束是根本不轉發。這是非常意想不到的行爲,因爲所有觸動都在iOS4中轉發。任何幫助,將不勝感激。
上面的代碼在你的UIButton子類中? – 2012-08-15 21:31:01
是的,它在我創建的UIButton子類中。 – daveMac 2012-08-15 21:54:02
那麼,它在模擬器中工作嗎?我只是做了一個子類測試,它的所有工作都很完美。 – 2012-08-15 21:57:56