-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathEARestrictedScrollView.h
executable file
·42 lines (34 loc) · 1.45 KB
/
EARestrictedScrollView.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// EARestrictedScrollView.h
//
// Copyright (c) 2015 Evgeny Aleksandrov. License: MIT.
#import <UIKit/UIKit.h>
@interface EARestrictedScrollView : UIScrollView
/**
* This property leads to containerView.subviews - all subviews except scroll indicators are stored there.
*/
@property (nonatomic, copy, readonly) NSArray *containedSubviews;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wproperty-attribute-mismatch"
/**
* When accessing this property with dot-notation - container offset will be used to calculate final value, so you can forget about implemetation details. Also lies in coordinate space of `contentView`.
*/
@property (nonatomic, assign, getter=alignedContentOffset, setter=setAlignedContentOffset:) CGPoint contentOffset;
#pragma GCC diagnostic pop
/**
* This is the rect property which defines restriction area in coordinate space of `contentView`. Use CGRectZero to reset restriction.
*/
@property (nonatomic, assign) CGRect restrictionArea;
/**
* Should not be used, since it changes parent contentOffset that is being manipulated by subclass.
*
* @see contentOffset
*/
- (void)setContentOffset:(CGPoint)contentOffset __attribute__((unavailable("use dot notation to access property")));
/**
* Should not be used, since it leads to parent contentOffset that is being manipulated by subclass.
*
* @see contentOffset
*/
- (CGPoint)contentOffset __attribute__((unavailable("use dot notation to access property")));
@end