Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 8c86774a3e53d77cc119f53a2b94a57a > files > 228

root-tutorial-5.34.14-2.fc18.noarch.rpm

#import "PadEditorScrollView.h"
#import "PadView.h"

@implementation PadEditorScrollView

//____________________________________________________________________________________________________
- (UIView *) hitTest : (CGPoint) point withEvent : (UIEvent *) event
{  
   UIView * const v = [super hitTest : point withEvent : event];
   
   if ([v isKindOfClass : [PadView class]]) {
      PadView * const padView = (PadView *)v;

      if ([padView pointOnSelectedObject : [self convertPoint : point toView : padView]]) {
         //If we have some object in this point, we can probably pan (zoom/unzoom an axis)
         //or just tap on object, selecting it.
         self.canCancelContentTouches = NO;
         self.delaysContentTouches = NO;
         [padView addPanRecognizer];
      } else {
         [padView removePanRecognizer];
         self.canCancelContentTouches = YES;
         self.delaysContentTouches = YES;
      }
   }
   
   return v;
}

@end