-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4a64029
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |