我有一个 UIViewController,在上面我放了一个 UIImageView,然后是一个 UIScrollView。
我可以很好地处理 UIScrollView 上的触摸,但是我想处理 UIViewController 上的某些触摸。
我只需要触摸保持 5 秒的 UIScrollView(这部分工作正常)。任何小于我想要传递给 UIViewController 的东西。
在 UISCrollView 我称之为:
- (void) touchesBegan: (NSSet *) touches withEvent: (UIEvent *) event
{
// some custom code to process a specific touch.
// all other touches
[super touchesBegan: touches withEvent: event];
}
有没有办法将触摸从 UIScrollView 传递到底部 UIViewController,或者我是否必须将对 UIViewController 的引用传递到 UIScrollView?