GAScrollView / GAScrollView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
|
|