Skip to content

Commit

Permalink
1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SuiFeng committed Dec 17, 2011
0 parents commit 4a64029
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
28 changes: 28 additions & 0 deletions GAScrollView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// GAScrollView.h
// Car
//
// Created by apple on 11-12-17.
// Copyright (c) 2011年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol GAScrollViewDelegate;

@interface GAScrollView : UIScrollView
{
id<GAScrollViewDelegate> GADelegate_;
}

@property (nonatomic, assign) id<GAScrollViewDelegate> GADelegate;

@end


@protocol GAScrollViewDelegate <UIScrollViewDelegate>

@optional
- (void) GAScrollView:(GAScrollView *)scroll touchBegin:(NSSet *)touches withEvent:(UIEvent *)event;

@end
24 changes: 24 additions & 0 deletions GAScrollView.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// GAScrollView.m
// Car
//
// Created by apple on 11-12-17.
// Copyright (c) 2011年 __MyCompanyName__. All rights reserved.
//

#import "GAScrollView.h"

@implementation GAScrollView

@synthesize GADelegate = GADelegate_;

- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];
[self.superview touchesBegan:touches withEvent:event];
if ([GADelegate_ respondsToSelector:@selector(GAScrollView:touchBegin:withEvent:)]) {
[GADelegate_ GAScrollView:self touchBegin:touches withEvent:event];
}
}

@end

0 comments on commit 4a64029

Please sign in to comment.